From 172ba2f08ab72ac23b8101fe16ed0beb83145fc4 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Tue, 9 Dec 2008 23:20:44 +0000 Subject: [PATCH] (bug 14365) skip invalid titles in RepoGroup::findFiles() --- RELEASE-NOTES | 2 ++ includes/filerepo/RepoGroup.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 64855a5388..4e8952c576 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 54c40ccd04..4fa4a03440 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -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 ); -- 2.20.1