From f5d447f69c2a2df753bcc93b8256c4de822dfeb0 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 29 Apr 2024 11:40:41 +0200 Subject: [PATCH] #13493 fixed error 500 --- pandora_console/include/functions_inventory.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php index 5e5726d96f..e4db5c5b1f 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -1148,11 +1148,13 @@ function get_inventory_basic_info_sql($params, $count=false) } if ($count !== true) { - $limit_condition = sprintf( - 'LIMIT %d, %d', - $params['start'], - $params['length'] - ); + if ((int) $params['length'] > -1) { + $limit_condition = sprintf( + 'LIMIT %d, %d', + $params['start'], + $params['length'] + ); + } $order_condition = sprintf('ORDER BY %s', $params['order']); } else {