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

@ -123,7 +123,7 @@ class HTMLDisplayHandler
// get the layout information currently requested
$oLayoutModel = getModel('layout');
$layout_info = Context::get('layout_info');
$layout_srl = $layout_info->layout_srl;
$layout_srl = $layout_info->layout_srl ?? 0;
// compile if connected to the layout
if($layout_srl > 0)
@ -403,7 +403,7 @@ class HTMLDisplayHandler
{
return '';
}
if($matches[3])
if($matches[3] ?? false)
{
$vars = Context::get(str_replace('?$__Context->', '', $matches[3]));
Context::loadFile(array($matches[2], null, null, null, $vars));