diff --git a/lib/base/mao/mao.class.php b/lib/base/mao/mao.class.php index 4ed702a5cd..a02b372109 100644 --- a/lib/base/mao/mao.class.php +++ b/lib/base/mao/mao.class.php @@ -518,7 +518,8 @@ class baseMao { if($condition['field'] == $field && $condition['operator'] == 'eq') { - $rawResult[] = $this->cache->fetch($this->table, $condition['value']); + $result = $this->cache->fetch($this->table, $condition['value']); + if($result !== null) $rawResult[] = $result; break; } } diff --git a/lib/cache/cache.class.php b/lib/cache/cache.class.php index 65f11a9fde..b4b0ef389b 100644 --- a/lib/cache/cache.class.php +++ b/lib/cache/cache.class.php @@ -614,7 +614,7 @@ class cache if($object) return $object; $objects = $this->initTableCache(); - return isset($objects[$id]) ? $objects[$id] : false; + return isset($objects[$id]) ? $objects[$id] : null; } /**