diff --git a/includes/theme.inc b/includes/theme.inc index 9b606e9fb..3cd7ced4a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -418,7 +418,7 @@ class ThemeRegistry Extends DrupalCacheArray { // are not registered, just check the existence of the key in the registry. // Use array_key_exists() here since a NULL value indicates that the theme // hook exists but has not yet been requested. - return array_key_exists($offset, $this->storage); + return isset($this->storage[$offset]) || array_key_exists($offset, $this->storage); } public function offsetGet($offset) { @@ -428,7 +428,7 @@ class ThemeRegistry Extends DrupalCacheArray { if (isset($this->storage[$offset])) { return $this->storage[$offset]; } - elseif (array_key_exists($offset, $this->storage)) { + elseif (isset($this->storage[$offset]) || array_key_exists($offset, $this->storage)) { return $this->resolveCacheMiss($offset); } }