X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Ffilebackend%2FFileBackendStore.php;h=ffb8793ccfc72a74ae332180658e1226218e9066;hp=f2c07e82538cc4337b9059a0106256c6fb931f0d;hb=169f8929b616e391a1c131b51d6f4f103e6ed1fc;hpb=4e9300e2beb07c40f0c7d5f63323c498a0331800 diff --git a/includes/libs/filebackend/FileBackendStore.php b/includes/libs/filebackend/FileBackendStore.php index f2c07e8253..ffb8793ccf 100644 --- a/includes/libs/filebackend/FileBackendStore.php +++ b/includes/libs/filebackend/FileBackendStore.php @@ -1396,12 +1396,12 @@ abstract class FileBackendStore extends FileBackend { } } - $res = $this->doExecuteOpHandlesInternal( $fileOpHandles ); + $statuses = $this->doExecuteOpHandlesInternal( $fileOpHandles ); foreach ( $fileOpHandles as $fileOpHandle ) { $fileOpHandle->closeResources(); } - return $res; + return $statuses; } /** @@ -1440,7 +1440,10 @@ abstract class FileBackendStore extends FileBackend { $name = strtolower( $name ); $maxHVLen = in_array( $name, $longs ) ? INF : 255; if ( strlen( $name ) > 255 || strlen( $value ) > $maxHVLen ) { - trigger_error( "Header '$name: $value' is too long." ); + $this->logger->error( "Header '{header}' is too long.", [ + 'filebackend' => $this->name, + 'header' => "$name: $value", + ] ); } else { $newHeaders[$name] = strlen( $value ) ? $value : ''; // null/false => "" } @@ -1587,7 +1590,7 @@ abstract class FileBackendStore extends FileBackend { // Validate and sanitize the relative path (backend-specific) $relPath = $this->resolveContainerPath( $shortCont, $relPath ); if ( $relPath !== null ) { - // Prepend any wiki ID prefix to the container name + // Prepend any domain ID prefix to the container name $container = $this->fullContainerName( $shortCont ); if ( self::isValidContainerName( $container ) ) { // Validate and sanitize the container name (backend-specific) @@ -1722,7 +1725,7 @@ abstract class FileBackendStore extends FileBackend { } /** - * Get the full container name, including the wiki ID prefix + * Get the full container name, including the domain ID prefix * * @param string $container * @return string @@ -1789,7 +1792,9 @@ abstract class FileBackendStore extends FileBackend { */ final protected function deleteContainerCache( $container ) { if ( !$this->memCache->delete( $this->containerCacheKey( $container ), 300 ) ) { - trigger_error( "Unable to delete stat cache for container $container." ); + $this->logger->warning( "Unable to delete stat cache for container {container}.", + [ 'filebackend' => $this->name, 'container' => $container ] + ); } } @@ -1887,7 +1892,9 @@ abstract class FileBackendStore extends FileBackend { return; // invalid storage path } if ( !$this->memCache->delete( $this->fileCacheKey( $path ), 300 ) ) { - trigger_error( "Unable to delete stat cache for file $path." ); + $this->logger->warning( "Unable to delete stat cache for file {path}.", + [ 'filebackend' => $this->name, 'path' => $path ] + ); } }