mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix #1641 error in PHP 8.0 while parsing widgetstyle XML info
This commit is contained in:
parent
be1fbc9d65
commit
008af51873
1 changed files with 2 additions and 1 deletions
|
|
@ -318,7 +318,8 @@ class widgetModel extends widget
|
|||
$buff[] = sprintf('$widgetStyle_info->license_link = %s;', var_export($xml_obj->license->attrs->link, true));
|
||||
|
||||
// preview
|
||||
if(!$xml_obj->preview->body) $xml_obj->preview->body = 'preview.jpg';
|
||||
if(!isset($xml_obj->preview)) $xml_obj->preview = new stdClass;
|
||||
if(!isset($xml_obj->preview->body) || !$xml_obj->preview->body) $xml_obj->preview->body = 'preview.jpg';
|
||||
$preview_file = sprintf("%s%s", $widgetStyle_path,$xml_obj->preview->body);
|
||||
if(file_exists($preview_file)) $buff[] = sprintf('$widgetStyle_info->preview = %s;', var_export($preview_file, true));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue