diff --git a/cache/classes/factory.php b/cache/classes/factory.php index e57d6ef077e..476ec0ba55b 100644 --- a/cache/classes/factory.php +++ b/cache/classes/factory.php @@ -173,7 +173,7 @@ class cache_factory { */ public function create_cache_from_definition($component, $area, array $identifiers = array(), $aggregate = null) { $definitionname = $component.'/'.$area; - if (array_key_exists($definitionname, $this->cachesfromdefinitions)) { + if (isset($this->cachesfromdefinitions[$definitionname])) { $cache = $this->cachesfromdefinitions[$definitionname]; $cache->set_identifiers($identifiers); return $cache; @@ -368,7 +368,7 @@ class cache_factory { if ($aggregate) { $id .= '::'.$aggregate; } - if (!array_key_exists($id, $this->definitions)) { + if (!isset($this->definitions[$id])) { // This is the first time this definition has been requested. if ($this->is_initialising()) { // We're initialising the cache right now. Don't try to create another config instance.