Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
N/A
-
Resolution: Fixed
-
Affects Version/s: 1.8.4
-
Fix Version/s: 1.9.6
-
Component/s: Zend_Db_Select
-
Labels:None
Description
In Zend_Db_Select class, the _renderLimitoffset function tries to get the max integer that PHP can support when no count parameter is given but in 32-bits architecture, intval(9223372036854775807) returns 0 instead of reducing to the max integer.
$select->from('Table')->limit(0, 5);
Will give you
SELECT `Table`.* FROM `Table`
Instead of
SELECT `Table`.* FROM `Table` LIMIT 2147483647 OFFSET 5
Using intval('9223372036854775807') - parameter as a string - will return the max value in both 32-bits and 64-bits architecture but more simply PHP_INT_MAX can be used.
Fixed with r19154