}
}
- $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
+ $statuses = $this->doExecuteOpHandlesInternal( $fileOpHandles );
foreach ( $fileOpHandles as $fileOpHandle ) {
$fileOpHandle->closeResources();
}
- return $res;
+ return $statuses;
}
/**
$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 => ""
}
// 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)
}
/**
- * 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
*/
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 ]
+ );
}
}
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 ]
+ );
}
}