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 90b3b47dc9
commit f6b7dc1474

View File

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