(bug 14365) skip invalid titles in RepoGroup::findFiles()
authorIlmari Karonen <vyznev@users.mediawiki.org>
Tue, 9 Dec 2008 23:20:44 +0000 (23:20 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Tue, 9 Dec 2008 23:20:44 +0000 (23:20 +0000)
RELEASE-NOTES
includes/filerepo/RepoGroup.php

index 64855a5..4e8952c 100644 (file)
@@ -392,6 +392,8 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16577) When a blocked user tries to rollback a page, the block message
   is now only displayed once
 * (bug 14268) SVG image sizes now extracted with proper XML parser
+* (bug 14365) RepoGroup::findFiles() no longer crashes if passed an invalid
+  title via the API
 
 === API changes in 1.14 ===
 
index 54c40cc..4fa4a03 100644 (file)
@@ -91,7 +91,8 @@ class RepoGroup {
                foreach ( $titles as $title ) {
                        if ( !( $title instanceof Title ) )
                                $title = Title::makeTitleSafe( NS_FILE, $title );
-                       $titleObjs[$title->getDBkey()] = $title;
+                       if ( $title )
+                               $titleObjs[$title->getDBkey()] = $title;
                }
 
                $images = $this->localRepo->findFiles( $titleObjs, $flags );