[feature/extension-manager] Correct usage of false cache return value

PHPBB3-10323
This commit is contained in:
Nils Adermann 2011-08-29 18:24:15 -04:00
parent 7435f344e2
commit 34f11a1039
2 changed files with 8 additions and 1 deletions

View file

@ -283,6 +283,11 @@ class phpbb_extension_finder
if ($cache && $this->cache) if ($cache && $this->cache)
{ {
if ($this->cached_queries === false)
{
$this->cached_queries = array();
}
$this->cached_queries[$query] = $files; $this->cached_queries[$query] = $files;
$this->cache->put('_extension_finder', $this->cached_queries); $this->cache->put('_extension_finder', $this->cached_queries);
} }

View file

@ -45,7 +45,9 @@ class phpbb_extension_manager
$this->phpEx = $phpEx; $this->phpEx = $phpEx;
$this->extension_table = $extension_table; $this->extension_table = $extension_table;
if (false === ($this->extensions = $this->cache->get('_extensions'))) $this->extensions = $this->cache->get('_extensions');
if ($this->extensions === false)
{ {
$this->load_extensions(); $this->load_extensions();
} }