Skip to content

Commit

Permalink
suppress warnings on xml reader failure. fixed error message on date …
Browse files Browse the repository at this point in the history
…parsing error.
  • Loading branch information
stopfstedt committed Dec 10, 2016
1 parent 007146b commit 3ac2187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ilios/MeSH/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function parse($uri)
$descriptors = new DescriptorSet();

$reader = $this->reader;
if (!$reader->open($uri)) {
if (!@$reader->open($uri)) {
throw new \Exception('XML reader failed to open '.$uri.'.');
};

Expand Down Expand Up @@ -428,7 +428,7 @@ protected function getDateFromNode(\DOMNode $node)
}
if (3 !== count($ymd)) {
throw new \Exception(
sprintf('Could not retrieve Year/Month/Day info from node "%".', $node->nodeName)
sprintf('Could not retrieve Year/Month/Day info from node "%s".', $node->nodeName)
);
}
$dt = new \DateTime();
Expand Down

0 comments on commit 3ac2187

Please sign in to comment.