mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix warnings in PHP 8.0 related to editor components
This commit is contained in:
parent
c5ceafc841
commit
c6f728cec6
4 changed files with 14 additions and 14 deletions
|
|
@ -20,7 +20,7 @@ class EditorHandler extends BaseObject
|
|||
{
|
||||
Context::set('component_info', $info);
|
||||
|
||||
if(!$info->extra_vars)
|
||||
if(!isset($info->extra_vars) || !$info->extra_vars)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ class image_link extends EditorHandler
|
|||
*/
|
||||
function transHTML($xml_obj)
|
||||
{
|
||||
$src = $xml_obj->attrs->src;
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$title = $xml_obj->attrs->title;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
$style = $xml_obj->attrs->style;
|
||||
$margin = (int)$xml_obj->attrs->margin;
|
||||
$src = $xml_obj->attrs->src ?? null;
|
||||
$width = $xml_obj->attrs->width ?? null;
|
||||
$height = $xml_obj->attrs->height ?? null;
|
||||
$align = $xml_obj->attrs->align ?? null;
|
||||
$alt = $xml_obj->attrs->alt ?? null;
|
||||
$title = $xml_obj->attrs->title ?? null;
|
||||
$border = intval($xml_obj->attrs->border ?? 0);
|
||||
$link_url = $xml_obj->attrs->link_url ?? null;
|
||||
$open_window = $xml_obj->attrs->open_window ?? null;
|
||||
$style = $xml_obj->attrs->style ?? null;
|
||||
$margin = intval($xml_obj->attrs->margin ?? 0);
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&', '&', $src);
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ class editorController extends editor
|
|||
if(!isset($xml_obj->attrs)) $xml_obj->attrs = new stdClass;
|
||||
$xml_obj->attrs->{$m[1][$i]} = $m[2][$i];
|
||||
}
|
||||
$xml_obj->body = $match[4];
|
||||
$xml_obj->body = $match[4] ?? null;
|
||||
|
||||
if(!$xml_obj->attrs->editor_component) return $match[0];
|
||||
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ class editorModel extends editor
|
|||
return new BaseObject(-1, 'msg_component_is_not_founded', $component);
|
||||
}
|
||||
|
||||
if(!self::$_loaded_component_list[$component][$editor_sequence])
|
||||
if(!isset(self::$_loaded_component_list[$component][$editor_sequence]))
|
||||
{
|
||||
// Create an object of the component and execute
|
||||
$class_path = sprintf('./modules/editor/components/%s/', $component);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue