Skip to content

Commit

Permalink
Merge pull request #7036 from kamil-tekiela/Add-exception
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Dec 1, 2021
2 parents d7d4b37 + 5d99109 commit 7e7b595
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/ErrorBaseline.php
Expand Up @@ -81,6 +81,10 @@ public static function read(FileProvider $fileProvider, string $baselineFile): a

$xmlSource = $fileProvider->getContents($baselineFile);

if ($xmlSource === '') {
throw new Exception\ConfigException('Baseline file is empty');
}

$baselineDoc = new \DOMDocument();
$baselineDoc->loadXML($xmlSource, LIBXML_NOBLANKS);

Expand Down

0 comments on commit 7e7b595

Please sign in to comment.