From 2d0f069800cafeaaef68d2807c4036c1f1f8c01a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 27 Jan 2012 18:21:58 +0000 Subject: [PATCH] r107980: added missing dir param to FileBackendShardListIterator --- includes/filerepo/backend/FileBackend.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 92d9795bd3..3e8ba88a43 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -1255,14 +1255,15 @@ abstract class FileBackend extends FileBackendBase { * @see FileBackendBase::clearCache() */ final public function clearCache( array $paths = null ) { + if ( is_array( $paths ) ) { + $paths = array_map( 'FileBackend::normalizeStoragePath', $paths ); + $paths = array_filter( $paths, 'strlen' ); // remove nulls + } if ( $paths === null ) { $this->cache = array(); } else { foreach ( $paths as $path ) { - $path = self::normalizeStoragePath( $path ); - if ( $path !== null ) { - unset( $this->cache[$path] ); - } + unset( $this->cache[$path] ); } } $this->doClearCache( $paths ); -- 2.20.1