summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2011-09-06 23:40:17 +0200
committerMike Funk <mfunk@xulonpress.com>2011-09-06 23:40:17 +0200
commitf08548b2b88324c36729a7dd4d179a9e1076dc14 (patch)
tree8f71f09d06d3c6152a7aefd410f8f14225e17b7c /system/database/DB_active_rec.php
parent27a883c946ee524bb7930edfcfc6e8c153119929 (diff)
Fixed int typecasting of limit parameter in DB_active_rec.php
If an empty string was passed, the typecast was changing it to 0. This produced "LIMIT 0" which returned no results. This must be a bug and not a feature because there are other params after limit in both $this->db->limit and $this->db->get.
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 841ede28e..a16363c68 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -874,7 +874,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
public function limit($value, $offset = '')
{
- $this->ar_limit = (int) $value;
+ $this->ar_limit = $value;
if ($offset != '')
{