Use "null coalescing assignment" operator for $docroot

This commit is contained in:
bergware
2023-10-26 14:00:15 +02:00
parent a671e237a0
commit ceeb125ba9
109 changed files with 726 additions and 743 deletions

View File

@@ -10,8 +10,7 @@
*/
?>
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/webGui/include/Helpers.php";
// add translations
@@ -49,7 +48,7 @@ if ($host && in_array($host,['keys.lime-technology.com','lime-technology.com']))
$key_file = basename($url);
exec("/usr/bin/wget -q -O ".escapeshellarg("/boot/config/$key_file")." ".escapeshellarg($url), $output, $return_var);
if ($return_var === 0) {
$var = @parse_ini_file('/var/local/emhttp/var.ini') ?: [];
$var = (array)@parse_ini_file('/var/local/emhttp/var.ini');
if (_var($var,'mdState')=="STARTED") {
response_complete(200, array('status' => _('Please Stop array to complete key installation')), _('success').', '._('Please Stop array to complete key installation'));
} else {