Skip to content

Commit f540d98

Browse files
authored
Fix for PHP >=7.2 NULL is not countable
1 parent 20ff714 commit f540d98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Xml.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ protected function __construct(
5353
$this->root = $root ?? $this;
5454
$this->parent = $parent;
5555
$this->sub = false;
56+
$this->children = [];
5657
}
5758

5859
public static function createRoot(string $name = null): self
@@ -474,4 +475,4 @@ private function calculateVars(\stdClass $parentVars = null)
474475
}
475476
return $vars;
476477
}
477-
}
478+
}

0 commit comments

Comments
 (0)