filebackend: Check return value of FileBackend::normalizeStoragePath

Avoid leaking a null value in the list of paths

Found by phan strict checks

Change-Id: Iffbd0a1d2cd05c9453fc7bca698095787f733f6c
This commit is contained in:
Umherirrender 2022-03-05 19:55:11 +01:00
parent d6818823a2
commit 208ebda9bc

View file

@ -1938,7 +1938,10 @@ abstract class FileBackendStore extends FileBackend {
// Get all the paths/containers from the items...
foreach ( $items as $item ) {
if ( self::isStoragePath( $item ) ) {
$paths[] = FileBackend::normalizeStoragePath( $item );
$path = FileBackend::normalizeStoragePath( $item );
if ( $path !== null ) {
$paths[] = $path;
}
}
}
// Get rid of any paths that failed normalization