diff --git a/includes/page_actions.php b/includes/page_actions.php index 4d218850..2b76355c 100755 --- a/includes/page_actions.php +++ b/includes/page_actions.php @@ -4,7 +4,7 @@ $pluginManager = \RaspAP\Plugins\PluginManager::getInstance(); // Get the requested page $extraFooterScripts = array(); -$page = $_SERVER['PATH_INFO']; +$page = $_SERVER['PATH_INFO'] ?? ''; // Check if any plugin wants to handle the request if (!$pluginManager->handlePageAction($page)) { diff --git a/plugins b/plugins index b8e51de4..054f6bc0 160000 --- a/plugins +++ b/plugins @@ -1 +1 @@ -Subproject commit b8e51de4480fa502ab88e861604f13a91c2233a4 +Subproject commit 054f6bc0abe6999ddd629cc6878d5ada1749a6e8 diff --git a/src/RaspAP/Plugins/PluginManager.php b/src/RaspAP/Plugins/PluginManager.php index d1de40d5..5fae5fc1 100644 --- a/src/RaspAP/Plugins/PluginManager.php +++ b/src/RaspAP/Plugins/PluginManager.php @@ -76,8 +76,10 @@ class PluginManager * Iterates over registered plugins and calls its associated method * @param string $page */ - public function handlePageAction(string $page): bool + public function handlePageAction(?string $page): bool { + $page = $page ?? ''; + foreach ($this->getInstalledPlugins() as $pluginClass) { $plugin = new $pluginClass($this->pluginPath, $pluginClass);