Don't call basename on null

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-10-01 17:30:52 +02:00
parent 7dc5bbae39
commit 0f3de7828e
No known key found for this signature in database
GPG key ID: 7076EA9751AACDDA

View file

@ -46,7 +46,7 @@ class FileName extends AbstractStringCheck implements IFileCheck {
* @return string
*/
protected function getActualValue(): string {
return basename($this->path);
return $this->path === null ? '' : basename($this->path);
}
/**