Various fixes to remove warnings in PHP 8.0

This commit is contained in:
Kijin Sung 2020-12-15 00:18:42 +09:00
parent 9a0bf6d907
commit 49923844b2
36 changed files with 271 additions and 176 deletions

View file

@ -335,9 +335,9 @@ class ModuleHandler extends Handler
}
// get type, kind
$type = $xml_info->action->{$this->act}->type;
$ruleset = $xml_info->action->{$this->act}->ruleset;
$meta_noindex = $xml_info->action->{$this->act}->meta_noindex;
$type = $xml_info->action->{$this->act}->type ?? null;
$ruleset = $xml_info->action->{$this->act}->ruleset ?? null;
$meta_noindex = $xml_info->action->{$this->act}->meta_noindex ?? null;
$kind = stripos($this->act, 'admin') !== FALSE ? 'admin' : '';
if ($meta_noindex === 'true')
{
@ -995,16 +995,16 @@ class ModuleHandler extends Handler
$viewType = $this->is_mobile ? 'M' : 'P';
if($viewType === 'M')
{
$layout_srl = $oModule->module_info->mlayout_srl;
$layout_srl = $oModule->module_info->mlayout_srl ?? 0;
if($layout_srl == -2)
{
$layout_srl = $oModule->module_info->layout_srl;
$layout_srl = $oModule->module_info->layout_srl ?? 0;
$viewType = 'P';
}
}
else
{
$layout_srl = $oModule->module_info->layout_srl;
$layout_srl = $oModule->module_info->layout_srl ?? 0;
}
// if layout_srl is rollback by module, set default layout