summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-09-07 18:54:25 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-09-07 18:54:25 +0200
commitbff3dfda42b58289c41f88342a0ab17846f52f3b (patch)
tree67509b9a2b5cc28a2bfce6a3fde452d47f026559 /system/database/DB_active_rec.php
parentec36dc8001f315fda9bfb37d283493ce5c34da57 (diff)
Use NULL as the default value for offset in limit(x, offset) so that default is not LIMIT 0.
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 89766e304..7162e2ac5 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -872,11 +872,11 @@ class CI_DB_active_record extends CI_DB_driver {
* @param integer the offset value
* @return object
*/
- public function limit($value, $offset = '')
+ public function limit($value, $offset = NULL)
{
$this->ar_limit = (int) $value;
- if ($offset != '')
+ if ( ! is_null($offset))
{
$this->ar_offset = (int) $offset;
}