$namespace = null;
}
- $element->addAttribute($attr_key, $attr_value, $namespace);
+ $element->addAttribute($attr_key, $attr_value ?? '', $namespace);
}
continue;
}
$repeated_tag_index[$tag . '_' . $level]++;
} else { // If it is not an array...
- $current[$tag] = [$current[$tag], $result]; //...Make it an array using using the existing value and the new value
+ $current[$tag] = [$current[$tag], $result]; //...Make it an array using the existing value and the new value
$repeated_tag_index[$tag . '_' . $level] = 1;
if ($priority == 'tag' and $get_attributes) {
if (isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well