You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if page = 984851907999915581,limit=10,($page - 1) * $limit cause it to be a float.so after (int)offset,it change to a negative number;
I have change it like this:
public function offset($offset)
{
$offset=(int)$offset;
$offset < 0 && $offset = 0;
return $this->add('offset', $offset);
}
The text was updated successfully, but these errors were encountered:
JihanZhuang
changed the title
offset function in Record.php has a bug that cause offset with a negative number
page function in Record.php has a bug that cause offset with a negative number
Nov 21, 2016
if page = 984851907999915581,limit=10,($page - 1) * $limit cause it to be a float.so after (int)offset,it change to a negative number;
I have change it like this:
public function offset($offset)
{
$offset=(int)$offset;
$offset < 0 && $offset = 0;
return $this->add('offset', $offset);
}
The text was updated successfully, but these errors were encountered: