Don't call basename on null
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
f09d1d6dbf
commit
58bf308c40
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue