Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -1255,14 +1255,15 @@ |
1256 | 1256 | * @see FileBackendBase::clearCache() |
1257 | 1257 | */ |
1258 | 1258 | final public function clearCache( array $paths = null ) { |
| 1259 | + if ( is_array( $paths ) ) { |
| 1260 | + $paths = array_map( 'FileBackend::normalizeStoragePath', $paths ); |
| 1261 | + $paths = array_filter( $paths, 'strlen' ); // remove nulls |
| 1262 | + } |
1259 | 1263 | if ( $paths === null ) { |
1260 | 1264 | $this->cache = array(); |
1261 | 1265 | } else { |
1262 | 1266 | foreach ( $paths as $path ) { |
1263 | | - $path = self::normalizeStoragePath( $path ); |
1264 | | - if ( $path !== null ) { |
1265 | | - unset( $this->cache[$path] ); |
1266 | | - } |
| 1267 | + unset( $this->cache[$path] ); |
1267 | 1268 | } |
1268 | 1269 | } |
1269 | 1270 | $this->doClearCache( $paths ); |