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:
parent
b8e34edd0d
commit
5d99109ba9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user