mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix warning in PHP 8.0
This commit is contained in:
parent
375a71866d
commit
faea821e78
9 changed files with 103 additions and 131 deletions
|
|
@ -291,7 +291,7 @@ class widgetController extends widget
|
|||
return $matches[0];
|
||||
}
|
||||
unset($vars->widget);
|
||||
|
||||
|
||||
return $this->execute($widget, $vars, $this->javascript_mode);
|
||||
}
|
||||
|
||||
|
|
@ -331,19 +331,16 @@ class widgetController extends widget
|
|||
{
|
||||
$buff = $matches[0][$i];
|
||||
$xml_doc = $oXmlParser->parse(trim($buff));
|
||||
|
||||
$args = $xml_doc->img->attrs;
|
||||
if(!$args) continue;
|
||||
// If you are not caching path
|
||||
$widget = $args->widget;
|
||||
$sequence = $args->widget_sequence;
|
||||
$cache = $args->widget_cache;
|
||||
if(!$cache) continue;
|
||||
if(!$sequence)
|
||||
if(!$args || !$widget || empty($args->widget_cache))
|
||||
{
|
||||
$sequence = sha1(json_encode($args));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$args->widget_sequence = $args->widget_sequence ?? 0;
|
||||
$args->colorset = $args->colorset ?? null;
|
||||
|
||||
foreach($args as $k => $v)
|
||||
{
|
||||
$args->{$k} = urldecode($v);
|
||||
|
|
@ -351,7 +348,7 @@ class widgetController extends widget
|
|||
|
||||
foreach($lang_list as $lang_type => $val)
|
||||
{
|
||||
$this->getCache($widget, $args, $lang_type, true, $sequence);
|
||||
$this->getCache($widget, $args, $lang_type, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -368,7 +365,7 @@ class widgetController extends widget
|
|||
}
|
||||
|
||||
// Fix the widget sequence if it is missing
|
||||
$widget_sequence = $override_sequence ?: ($args->widget_sequence ?? 0);
|
||||
$widget_sequence = $override_sequence ?: $args->widget_sequence;
|
||||
if (!$widget_sequence)
|
||||
{
|
||||
$widget_sequence = sha1(json_encode($args));
|
||||
|
|
@ -463,8 +460,12 @@ class widgetController extends widget
|
|||
if($escaped) $args->{$key} = utf8RawUrlDecode($val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Set default
|
||||
$args->widget_sequence = $args->widget_sequence ?? 0;
|
||||
$args->widget_cache = $args->widget_cache ?? 0;
|
||||
$args->colorset = $args->colorset ?? null;
|
||||
|
||||
/**
|
||||
* Widgets widgetContent/widgetBox Wanted If you are not content
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue