From 8a920a16e70ab55e49d22ce40d51ee962f7df1c4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Mon, 1 Nov 2021 20:31:42 +0000 Subject: Address PHPStan warnings in 'classes/pluginhost.php'. ------ -------------------------------------------------------------------- Line classes/pluginhost.php ------ -------------------------------------------------------------------- 16 Property PluginHost::$last_registered is never read, only written. 386 If condition is always true. ------ -------------------------------------------------------------------- --- classes/pluginhost.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'classes/pluginhost.php') diff --git a/classes/pluginhost.php b/classes/pluginhost.php index f067543bb..b506a957a 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -13,7 +13,6 @@ class PluginHost { private $api_methods = array(); private $plugin_actions = array(); private $owner_uid; - private $last_registered; private $data_loaded; private static $instance; @@ -383,7 +382,7 @@ class PluginHost { if (!isset($this->plugins[$class])) { try { - if (file_exists($file)) require_once $file; + require_once $file; } catch (Error $err) { user_error($err, E_USER_WARNING); continue; @@ -404,8 +403,6 @@ class PluginHost { _bind_textdomain_codeset($class, "UTF-8"); } - $this->last_registered = $class; - try { switch ($kind) { case $this::KIND_SYSTEM: -- cgit v1.2.3