filebackend: Avoid passing null to FileBackend::normalizeContainerPath

strtr(): Passing null to parameter #1 ($string) of type string is
deprecated in php8.1

Change-Id: I224d8e8baa9d878db3635cb6c46eb62eb6f60469
(cherry picked from commit 596589d9032b5e7a3f9b4ed7e0558b42cf66690b)
This commit is contained in:
Umherirrender 2025-04-08 23:46:15 +02:00 committed by Jforrester
parent 65d32263fd
commit 69832205c4

View file

@ -1623,7 +1623,7 @@ abstract class FileBackendStore extends FileBackend {
*/
final protected function resolveStoragePath( $storagePath ) {
[ $backend, $shortCont, $relPath ] = self::splitStoragePath( $storagePath );
if ( $backend === $this->name ) { // must be for this backend
if ( $backend === $this->name && $relPath !== null ) { // must be for this backend
$relPath = self::normalizeContainerPath( $relPath );
if ( $relPath !== null && self::isValidShortContainerName( $shortCont ) ) {
// Get shard for the normalized path if this container is sharded