summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_utility.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 488ebf3ac..a32fd4455 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -106,9 +106,9 @@ abstract class CI_DB_utility {
return $this->db->data_cache['db_names'];
}
- for ($i = 0, $c = count($query); $i < $c; $i++)
+ for ($i = 0, $query = $query->result_array(), $c = count($query); $i < $c; $i++)
{
- $this->db->data_cache['db_names'] = current($query[$i]);
+ $this->db->data_cache['db_names'][] = current($query[$i]);
}
return $this->db->data_cache['db_names'];