fix limit_query to convert $num_rows==='' to -1 to not give a TypeError as $num_rows is integer now

This commit is contained in:
ralf 2024-07-06 13:59:47 +02:00
parent 079dcac0ef
commit 26296b5fd5

View File

@ -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);
}
/**