diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3aa121ec6a..55042e3154 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1848,11 +1848,13 @@ function events_get_all( ); if (isset($limit, $offset) === true - && $limit !== 0 + && (int) $limit !== 0 && isset($filter['csv_all']) === false ) { $count = count($data); - $end = ((int) $offset !== 0) ? ($offset + $limit) : $limit; + ((int) $limit === -1) + ? $end = count($data) + : $end = ((int) $offset !== 0) ? ($offset + $limit) : $limit; $finally = array_slice($data, $offset, $end, true); $return = [ 'buffers' => $buffers,