summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-23 23:37:22 +0200
committeradmin <devnull@localhost>2006-10-23 23:37:22 +0200
commit7acd581d9441fb8ada4c46c58f4ec30a01507506 (patch)
tree6e62cffa5d1da5b60dfe06fa0338bf1ac78011f7 /system/database/DB_utility.php
parentca335fcd8342ec1422a63ac397a404e73766b0ef (diff)
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index d7018bf2b..9533ec607 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -133,7 +133,11 @@ class CI_DB_utility {
}
$query = $this->db->query($sql);
- return current($query->result_array());
+ $res = $query->result_array();
+
+ // Note: Due to a bug in current() that affects some versions
+ // of PHP we can not pass function call directly into it
+ return current($res);
}
// --------------------------------------------------------------------
@@ -159,7 +163,10 @@ class CI_DB_utility {
$query = $this->db->query($sql);
// Build the result array...
- $res = current($query->result_array());
+ // Note: Due to a bug in current() that affects some versions
+ // of PHP we can not pass function call directly into it
+ $res = $query->result_array();
+ $res = current($res);
$key = str_replace($this->db->database.'.', '', current($res));
$keys = array_keys($res);
unset($res[$keys[0]]);
@@ -190,7 +197,11 @@ class CI_DB_utility {
}
$query = $this->db->query($sql);
- return current($query->result_array());
+
+ // Note: Due to a bug in current() that affects some versions
+ // of PHP we can not pass function call directly into it
+ $res = $query->result_array();
+ return current($res);
}
// --------------------------------------------------------------------