From: Aaron Schulz Date: Fri, 27 Jan 2012 18:21:58 +0000 (+0000) Subject: r107980: added missing dir param to FileBackendShardListIterator X-Git-Tag: 1.31.0-rc.0~25057 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=2d0f069800cafeaaef68d2807c4036c1f1f8c01a;p=lhc%2Fweb%2Fwiklou.git r107980: added missing dir param to FileBackendShardListIterator --- 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 );