summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_result.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index b163bb5ea..4e8c4fc76 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -63,6 +63,11 @@ class CI_DB_result {
return $this->result_object;
}
+ if ($this->num_rows == 0)
+ {
+ return array();
+ }
+
$this->_data_seek(0);
while ($row = $this->_fetch_object())
{
@@ -87,6 +92,11 @@ class CI_DB_result {
return $this->result_array;
}
+ if ($this->num_rows == 0)
+ {
+ return array();
+ }
+
$this->_data_seek(0);
while ($row = $this->_fetch_assoc())
{