From 8977fc38e1afa98577500303ce6ec7182bdc5a50 Mon Sep 17 00:00:00 2001 From: camer0n Date: Tue, 29 Apr 2025 14:50:31 -0700 Subject: [PATCH] Issue #5484 Fatal error avoidance. Cause of failure unknown. --- e107_handlers/plugin_class.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index f925639b9..5cb165786 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -140,6 +140,10 @@ class e_plugin */ public function getDetected() { + if(empty($this->_data)) + { + + } return array_keys($this->_data); } @@ -818,10 +822,18 @@ class e_plugin $cacheTag = self::CACHETAG; - if($force === false && $tmp = e107::getCache()->retrieve($cacheTag, self::CACHETIME, true, true)) + if(($force === false) && $tmp = e107::getCache()->retrieve($cacheTag, self::CACHETIME, true, true)) { $this->_data = e107::unserialize($tmp); - return true; + + if(empty($this->_data)) + { + trigger_error(__FILE__.' '.__METHOD__.' plugin cache failed to load.', E_USER_WARNING); + } + else + { + return true; + } } $dirs = scandir(e_PLUGIN);