Always return a valid array/iterator

This commit is contained in:
Thomas Bruederli 2014-02-07 13:24:11 +01:00
parent 449b4d044a
commit 98741574d9

View file

@ -453,7 +453,7 @@ class kolab_storage_cache
); );
if ($this->db->is_error($sql_result)) { if ($this->db->is_error($sql_result)) {
return null; return $result;
} }
while ($sql_arr = $this->db->fetch_assoc($sql_result)) { while ($sql_arr = $this->db->fetch_assoc($sql_result)) {
@ -483,7 +483,7 @@ class kolab_storage_cache
} }
if ($index->is_error()) { if ($index->is_error()) {
return null; return $result;
} }
$index = $index->get(); $index = $index->get();