[eluser]0plus1[/eluser]
I upgraded today from 2.0 to 2.1 and I noticed that some of the queries where being interpreted by active record with LIMIT 0;
Now, I got accustomed during the years in doing this:
Code:
$this->model->x(false,false);
function x($limit,$offset){
...
$this->db->limit($limit,$offset);
}
to avoid setting a limit when I didn't want one (especially for debugging).
After searching (didn't found mention in the changelog) I discovered that the:
Code:
public function limit($value, $offset = '')
in
file now has typecasting.
Since
I got the limit 0.
I propose in the next version to change the function to:
Code:
/**
* Sets the LIMIT value
*
* @param integer the limit value
* @param integer the offset value
* @return object
*/
public function limit($value, $offset = '')
{
$this->ar_limit = ($value===false)?false:(int) $value;
if ($offset != '')
{
$this->ar_offset = ($offset===false)?false:(int) $offset;
}
return $this;
}
Thank you for your consideration