r35892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35891‎ | r35892 | r35893 >
Date:23:24, 4 June 2008
Author:aaron
Status:old
Tags:
Comment:
Title may come in as an empty string, which is not null, so the previous fails and lets a bad title slip in, which can make errors
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -264,8 +264,8 @@
265265 $this->parseContinueParam();
266266 else {
267267 $title = $this->params['title'];
268 - if (!is_null($title)) {
269 - $this->rootTitle = Title :: newFromText($title);
 268+ if ( $title ) {
 269+ $this->rootTitle = Title::newFromText($title);
270270 } else {
271271 $this->dieUsageMsg(array('missingparam', 'title'));
272272 }

Status & tagging log