Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 56acc35ec725afd1f536d1f10b661357 > files > 2

glpi-9.1.6-2.2.mga6.src.rpm

From 5c58d4c57be7b1e0c1de925b97f22d4468291d41 Mon Sep 17 00:00:00 2001
From: Johan Cwiklinski <jcwiklinski@teclib.com>
Date: Mon, 2 Jul 2018 08:12:32 +0200
Subject: [PATCH] Cast limits to integer; fixes #4270

---
 inc/search.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/search.class.php b/inc/search.class.php
index 79c32856bd..b6f684be26 100644
--- a/inc/search.class.php
+++ b/inc/search.class.php
@@ -890,7 +890,7 @@ static function constructSQL(array &$data) {
       $numrows = 0;
       //No search : count number of items using a simple count(ID) request and LIMIT search
       if ($data['search']['no_search']) {
-         $LIMIT = " LIMIT ".$data['search']['start'].", ".$data['search']['list_limit'];
+         $LIMIT = " LIMIT ".(int)$data['search']['start'].", ".(int)$data['search']['list_limit'];
 
          // Force group by for all the type -> need to count only on table ID
          if (!isset($searchopt[1]['forcegroupby'])) {