mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
committed by
Pierrick Le Gall
parent
d69bc8b884
commit
75392e6886
@@ -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<count($sections); $i++)
|
||||
{
|
||||
if (empty($sections[$i]))
|
||||
@@ -56,4 +56,4 @@ else
|
||||
{
|
||||
die('Missing file '.htmlentities($filename));
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user