aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-08-29 18:24:15 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 15:42:48 +0200
commit34f11a1039745ee1de48f1818f781ae1ee2b85ac (patch)
tree767ed91d087c5d8d5e881885da122d562f0c7fde /phpBB
parent7435f344e20ae4dce875b46746f46ddc874e41f3 (diff)
downloadforums-34f11a1039745ee1de48f1818f781ae1ee2b85ac.tar
forums-34f11a1039745ee1de48f1818f781ae1ee2b85ac.tar.gz
forums-34f11a1039745ee1de48f1818f781ae1ee2b85ac.tar.bz2
forums-34f11a1039745ee1de48f1818f781ae1ee2b85ac.tar.xz
forums-34f11a1039745ee1de48f1818f781ae1ee2b85ac.zip
[feature/extension-manager] Correct usage of false cache return value
PHPBB3-10323
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/extension/finder.php5
-rw-r--r--phpBB/includes/extension/manager.php4
2 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/extension/finder.php b/phpBB/includes/extension/finder.php
index b3cdbd6ab9..d25823ca43 100644
--- a/phpBB/includes/extension/finder.php
+++ b/phpBB/includes/extension/finder.php
@@ -283,6 +283,11 @@ class phpbb_extension_finder
if ($cache && $this->cache)
{
+ if ($this->cached_queries === false)
+ {
+ $this->cached_queries = array();
+ }
+
$this->cached_queries[$query] = $files;
$this->cache->put('_extension_finder', $this->cached_queries);
}
diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php
index a1863040d0..e1e7571573 100644
--- a/phpBB/includes/extension/manager.php
+++ b/phpBB/includes/extension/manager.php
@@ -45,7 +45,9 @@ class phpbb_extension_manager
$this->phpEx = $phpEx;
$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();
}