* @ingroup FileBackend
*/
use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
use Wikimedia\WaitConditionLoop;
/**
}
$this->session = md5( implode( '-', $random ) );
- $this->logger = $config['logger'] ?? new \Psr\Log\NullLogger();
+ $this->logger = $config['logger'] ?? new NullLogger();
}
/**
final protected function normalizePathsByType( array $pathsByType ) {
$res = [];
foreach ( $pathsByType as $type => $paths ) {
+ foreach ( $paths as $path ) {
+ if ( (string)$path === '' ) {
+ throw new InvalidArgumentException( __METHOD__ . ": got empty path." );
+ }
+ }
$res[$this->lockTypeMap[$type]] = array_unique( $paths );
}