Browse Source

Make doctype validation test strict

Michel Salib 12 years ago
parent
commit
ff1952ea70
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Serializer/XmlDeserializationVisitor.php

+ 1 - 1
Serializer/XmlDeserializationVisitor.php

@@ -69,7 +69,7 @@ class XmlDeserializationVisitor extends AbstractDeserializationVisitor
         foreach ($dom->childNodes as $child) {
             if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
                 $internalSubset = str_replace(PHP_EOL, '', $child->internalSubset);
-                if (!in_array($internalSubset, $this->documentWhitelist)) {
+                if (!in_array($internalSubset, $this->documentWhitelist, true)) {
                     throw new \InvalidArgumentException(sprintf(
                         'The document type "%s" is not allowed. If it is safe, you may add it to the whitelist configuration.',
                         $internalSubset