commit | b0eae5f81a4cb92911bb215ad814ae5caef4f61d | [log] [tgz] |
---|---|---|
author | Phil Sturgeon <email@philsturgeon.co.uk> | Wed Aug 10 09:00:52 2011 -0600 |
committer | Phil Sturgeon <email@philsturgeon.co.uk> | Wed Aug 10 09:00:52 2011 -0600 |
tree | e2ce1502f05608991324b36d2a034f0347f0edb7 | |
parent | 277c57c5c43a0f3ede09d679085485bc50c44b88 [diff] [blame] |
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
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 0238c73..7bab729 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php
@@ -870,11 +870,11 @@ */ 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;