fix PHP 8.0 error: key(): Argument #1 ($array) must be of type array, null given

This commit is contained in:
Ralf Becker 2021-09-27 17:28:41 +02:00
parent b953eecf40
commit c56dd9fb4e

View File

@ -1193,7 +1193,7 @@ class filemanager_ui
//_debug_array($content); //_debug_array($content);
$path =& $content['path']; $path =& $content['path'];
$button = @key($content['button']); $button = @key($content['button'] ?? []);
unset($content['button']); unset($content['button']);
if(!$button && $content['sudo'] && $content['sudouser']) if(!$button && $content['sudo'] && $content['sudouser'])
{ {