diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 17:00:52 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 17:00:52 +0200 |
commit | b0eae5f81a4cb92911bb215ad814ae5caef4f61d (patch) | |
tree | e2ce1502f05608991324b36d2a034f0347f0edb7 /system/database | |
parent | 277c57c5c43a0f3ede09d679085485bc50c44b88 (diff) |
Typecast limit and offset in the Database Driver to integers. Fixes https://bitbucket.org/ellislab/codeigniter-reactor/issue/341/active-record-limit-function-have-sql#comment-597403
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_active_rec.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 0238c7348..7bab729f5 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -870,11 +870,11 @@ class CI_DB_active_record extends CI_DB_driver { */ public function limit($value, $offset = '') { - $this->ar_limit = $value; + $this->ar_limit = (int) $value; if ($offset != '') { - $this->ar_offset = $offset; + $this->ar_offset = (int) $offset; } return $this; |