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 197d533987
commit ce417f30c4
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }
/** /**