From 8a984c46ea6d90a089206031d9b185cfc4236acf Mon Sep 17 00:00:00 2001 From: ralf <rb@egroupware.org> Date: Sat, 6 Jul 2024 13:59:47 +0200 Subject: [PATCH] fix limit_query to convert $num_rows==='' to -1 to not give a TypeError as $num_rows is integer now --- api/src/Db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Db.php b/api/src/Db.php index 99eedbe234..62c498635d 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -877,9 +877,9 @@ class Db * @param array|boolean $inputarr array for binding variables to parameters or false (default) * @return ADORecordSet or false, if the query fails */ - function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = '',$inputarr=false) + function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = -1,$inputarr=false) { - return $this->query($Query_String,$line,$file,$offset,$num_rows,$inputarr); + return $this->query($Query_String,$line,$file,$offset,$num_rows === '' ? -1 : (int)$num_rows,$inputarr); } /**