Use "null coalescing assignment" operator for $docroot

This commit is contained in:
bergware
2023-10-26 18:17:44 +02:00
parent 33a64665ea
commit d4e8617eef
4 changed files with 6 additions and 6 deletions
@@ -12,7 +12,7 @@
*/
?>
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: "/usr/local/emhttp";
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
function readJson($file) {
@@ -12,7 +12,7 @@
*/
?>
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: "/usr/local/emhttp";
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
$type = $argv[1]??''; // plugin or language