Title may come in as an empty string, which is not null, so the previous fails and...
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 4 Jun 2008 23:24:25 +0000 (23:24 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 4 Jun 2008 23:24:25 +0000 (23:24 +0000)
includes/api/ApiQueryBacklinks.php

index 3483742..959c9fa 100644 (file)
@@ -264,8 +264,8 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        $this->parseContinueParam();
                else {
                        $title = $this->params['title'];
-                       if (!is_null($title)) {
-                               $this->rootTitle = Title :: newFromText($title);
+                       if ( $title ) {
+                               $this->rootTitle = Title::newFromText($title);
                        } else {
                                $this->dieUsageMsg(array('missingparam', 'title'));
                        }