Fix warning when forwarded module info does not contain all attributes

This commit is contained in:
Kijin Sung 2023-12-30 21:05:31 +09:00
parent 600811a8f0
commit 9175d51bd5

View file

@ -510,12 +510,12 @@ class ModuleHandler extends Handler
if(!empty($forward->module)) if(!empty($forward->module))
{ {
$kind = (stripos($forward->act, 'admin') !== false || stripos($forward->class_name, 'admin') !== false) ? 'admin' : ''; $kind = (stripos($forward->act, 'admin') !== false || stripos($forward->class_name ?? '', 'admin') !== false) ? 'admin' : '';
$type = $forward->type; $type = $forward->type ?? null;
$ruleset = $forward->ruleset; $ruleset = $forward->ruleset ?? null;
$tpl_path = $oModule->getTemplatePath(); $tpl_path = $oModule->getTemplatePath();
$orig_module = $oModule; $orig_module = $oModule;
if($forward->meta_noindex === 'true') if(isset($forward->meta_noindex) && $forward->meta_noindex === 'true')
{ {
Context::addMetaTag('robots', 'noindex'); Context::addMetaTag('robots', 'noindex');
} }
@ -547,7 +547,7 @@ class ModuleHandler extends Handler
} }
} }
if($forward->class_name) if(!empty($forward->class_name))
{ {
if (isset($xml_info->namespaces) && count($xml_info->namespaces)) if (isset($xml_info->namespaces) && count($xml_info->namespaces))
{ {