Skip to content

Commit

Permalink
Pass the errors into getXmlErrors()
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain Cuthbertson committed Aug 28, 2012
1 parent 0d576d1 commit c117acb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Routing/Loader/RestXmlCollectionLoader.php
Expand Up @@ -110,8 +110,10 @@ protected function validate(\DOMDocument $dom)
$schema = __DIR__.'/../../Resources/config/schema/routing/rest_routing-1.0.xsd';

$current = libxml_use_internal_errors(true);
libxml_clear_errors();

if (!$dom->schemaValidate($schema)) {
throw new \InvalidArgumentException(implode("\n", $this->getXmlErrors()));
throw new \InvalidArgumentException(implode("\n", $this->getXmlErrors($current)));
}
libxml_use_internal_errors($current);
}
Expand Down

0 comments on commit c117acb

Please sign in to comment.