Fix warnings in PHP.x across several modules involved in site menu & design editing feature

This commit is contained in:
Kijin Sung 2023-10-05 15:51:02 +09:00
parent 82b8785c14
commit 741f725bcf
6 changed files with 64 additions and 51 deletions

View file

@ -432,8 +432,8 @@ class autoinstallAdminModel extends autoinstall
$_download_server = 'https://download.xpressengine.com/';
$config = new stdClass();
$config->location_site = $config_info->location_site ? $config_info->location_site : $_location_site;
$config->download_server = $config_info->download_server ? $config_info->download_server : $_download_server;
$config->location_site = ($config_info->location_site ?? null) ?: $_location_site;
$config->download_server = ($config_info->download_server ?? null) ?: $_download_server;
return $config;
}

View file

@ -349,13 +349,13 @@ class autoinstallModel extends autoinstall
$path = substr($path, 0, strlen($path) - 1);
}
if(!$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path])
if(empty($GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path]))
{
$args = new stdClass();
$args->path = $path;
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl;
$GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl ?? null;
}
return $GLOBALS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];