Merge pull request #17359 from nextcloud/bugfix/noid/dont-call-basename-on-null

Don't call basename on null
This commit is contained in:
Roeland Jago Douma 2019-10-04 11:29:14 +02:00 committed by GitHub
commit 7b729c581d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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