diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1c90819..72d933b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="tests/bootstrap.php" > diff --git a/src/Welldom/Document.php b/src/Welldom/Document.php index 461eb68..b331da9 100644 --- a/src/Welldom/Document.php +++ b/src/Welldom/Document.php @@ -345,7 +345,7 @@ public function createElement($name, $value = null, $namespaceUri = null) { */ public function createNode($expression, $value = null, array $attributes = null) { - $current = ('/' === $expression{0}) ? $this : $this->documentElement; + $current = ('/' === $expression[0]) ? $this : $this->documentElement; $xpaths = explode('/', str_replace('//', '', $expression)); $i = 0; diff --git a/src/Welldom/Element.php b/src/Welldom/Element.php index 44b4d0f..8368ab5 100644 --- a/src/Welldom/Element.php +++ b/src/Welldom/Element.php @@ -284,7 +284,7 @@ public function toArray($renderRoot = false) $mValue = $childNode->getValue(); } - $sKey = $childNode->nodeName{0} == '#' ? 0 : $childNode->nodeName; + $sKey = $childNode->nodeName[0] == '#' ? 0 : $childNode->nodeName; // this will give us a clue as to what the result structure should be // how many of these child nodes do we have?