mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Fix undefined property warning in PHP 8.0
This commit is contained in:
parent
3c00ff1cc5
commit
8224eb4027
1 changed files with 8 additions and 2 deletions
|
|
@ -274,12 +274,18 @@ class editorController extends editor
|
|||
}
|
||||
$xml_obj->body = $match[4] ?? null;
|
||||
|
||||
if(!$xml_obj->attrs->editor_component) return $match[0];
|
||||
if(!isset($xml_obj->attrs->editor_component) || !$xml_obj->attrs->editor_component)
|
||||
{
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
// Get converted codes by using component::transHTML()
|
||||
$oEditorModel = getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($xml_obj->attrs->editor_component, 0);
|
||||
if(!is_object($oComponent)||!method_exists($oComponent, 'transHTML')) return $match[0];
|
||||
if(!is_object($oComponent) || !method_exists($oComponent, 'transHTML'))
|
||||
{
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
return $oComponent->transHTML($xml_obj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue