Don't call basename on null
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
197d533987
commit
ce417f30c4
|
@ -59,7 +59,7 @@ class FileName extends AbstractStringCheck {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getActualValue(): string {
|
protected function getActualValue(): string {
|
||||||
return basename($this->path);
|
return $this->path === null ? '' : basename($this->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue