Fix #1470 misc errors in PHP 8.0

This commit is contained in:
Kijin Sung 2020-11-30 21:56:15 +09:00
parent cc1a00e923
commit 7d8a546b64
3 changed files with 6 additions and 10 deletions

View file

@ -348,20 +348,16 @@ class XmlJsFilter extends XeXmlParser
}
// generates the response script
$response_count = count($response_tag);
$responses = array();
for($i = 0; $i < $response_count; $i++)
foreach ($response_tag ?: [] as $val)
{
$attrs = $response_tag[$i]->attrs;
$name = $attrs->name;
$name = $val->attrs->name;
$responses[] = "'{$name}'";
}
// writes lang values of the form field
$target_count = count($target_list);
for($i = 0; $i < $target_count; $i++)
foreach ($target_list ?: [] as $target)
{
$target = $target_list[$i];
if(!$lang->{$target})
{
$lang->{$target} = $target;