diff --git a/src/Tempest/View/src/Elements/ElementFactory.php b/src/Tempest/View/src/Elements/ElementFactory.php index 5aaccebd5..152af2e3a 100644 --- a/src/Tempest/View/src/Elements/ElementFactory.php +++ b/src/Tempest/View/src/Elements/ElementFactory.php @@ -55,7 +55,7 @@ private function makeElement(DOMNode $node, ?Element $parent): ?Element $attributes = []; /** @var DOMAttr $attribute */ - foreach ($node->attributes as $attribute) { + foreach ($node->attributes ?? [] as $attribute) { $name = str($attribute->name)->camel()->toString(); $attributes[$name] = $attribute->value;