1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Throw exception when baseline file is empty

This commit is contained in:
Kamil Tekiela 2021-12-01 18:09:30 +00:00
parent b8e34edd0d
commit 5d99109ba9

View File

@ -81,6 +81,10 @@ class ErrorBaseline
$xmlSource = $fileProvider->getContents($baselineFile);
if ($xmlSource === '') {
throw new Exception\ConfigException('Baseline file is empty');
}
$baselineDoc = new \DOMDocument();
$baselineDoc->loadXML($xmlSource, LIBXML_NOBLANKS);