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 committed by Backportbot
parent f09d1d6dbf
commit 58bf308c40
1 changed files with 1 additions and 1 deletions

View File

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