Always initialize extra_vars attribute

This commit is contained in:
Kijin Sung 2025-05-19 21:29:25 +09:00
parent 86118dbf50
commit 6727b124cd
2 changed files with 8 additions and 0 deletions

View file

@ -80,6 +80,10 @@ class AddonInfoParser extends BaseParser
{
$info->extra_vars = get_object_vars(self::_getExtraVars($xml->extra_vars, $lang, 'addon'));
}
else
{
$info->extra_vars = [];
}
// Prepare additional fields that will be filled in later.
$info->is_enabled = (object)['pc' => false, 'mobile' => false];

View file

@ -80,6 +80,10 @@ class EditorComponentParser extends BaseParser
{
$info->extra_vars = self::_getExtraVars($xml->extra_vars, $lang, 'editor_component');
}
else
{
$info->extra_vars = new \stdClass;
}
// Return the complete result.
return $info;