[eluser]web-johnny[/eluser]
OK the first thing that it comes to my mind is why to have a $this->db->limit(null) ?
You can avoid this problem easily . So it make sense to me that when you add a parameter to limit just transform it to integer. The only right thing about this is the second parameter because there are some cases that perhaps we need to have a parameter for the second segment of the function. But then again there is not any problem with this as you will have the following results:
Code:
//This means I don't need any data
$this->db->limit(null);
//It will be LIMIT 0 , so no data will be returned as expected
Code:
//This means I don't need the second parameter
$this->db->limit(20,null);
//It will be LIMIT 20,0 so the data will begin for the row 0 that this is correct too
So in my opinion is not a bug as the function limit comments has a very specific structure:
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 = (int) $value;
if ($offset != '')
{
$this->ar_offset = (int) $offset;
}
return $this;
}