From 75392e68868176158a8c3f33c446e96d1290b124 Mon Sep 17 00:00:00 2001 From: Hood-fr <36336734+Hood-fr@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:06:30 +0100 Subject: [PATCH] Correction for PHP Deprecated: explode() More robust syntax if $_GET['section'] turns out to be null, avoid messages as PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated --- admin/plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/plugin.php b/admin/plugin.php index bd3916953..7738d6fe8 100644 --- a/admin/plugin.php +++ b/admin/plugin.php @@ -14,7 +14,7 @@ if( !defined("PHPWG_ROOT_PATH") ) include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); check_status(ACCESS_ADMINISTRATOR); -$sections = explode('/', $_GET['section'] ); +$sections = explode('/', $_GET['section'] ?? ''); for ($i=0; $i \ No newline at end of file +?>