r48813 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48812‎ | r48813 | r48814 >
Date:13:43, 25 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Check for title validity in ApiQueryCategories
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -87,7 +87,7 @@
8888 foreach($params['categories'] as $cat)
8989 {
9090 $title = Title::newFromText($cat);
91 - if($title->getNamespace() != NS_CATEGORY)
 91+ if(!$title || $title->getNamespace() != NS_CATEGORY)
9292 $this->setWarning("``$cat'' is not a category");
9393 else
9494 $cats[] = $title->getDBkey();
@@ -239,4 +239,4 @@
240240 public function getVersion() {
241241 return __CLASS__ . ': $Id$';
242242 }
243 -}
\ No newline at end of file
 243+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r50097* Backported r48813, r48819: fatal errors in the APItstarling06:35, 1 May 2009

Status & tagging log