Tweak error messages
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 5 Jun 2008 00:00:07 +0000 (00:00 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 5 Jun 2008 00:00:07 +0000 (00:00 +0000)
includes/api/ApiQueryBacklinks.php

index e62fb07..cdc70ed 100644 (file)
@@ -263,9 +263,13 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                if (!is_null($this->params['continue']))
                        $this->parseContinueParam();
                else {
-                       $title = Title::newFromText( $this->params['title'] );
-                       if ( $title ) {
-                               $this->rootTitle = $title;
+                       if ( $this->params['title'] !== "" ) {
+                               $title = Title::newFromText( $this->params['title'] );
+                               if ( !$title ) {
+                                       $this->dieUsage("Invalid title param");
+                               } else {
+                                       $this->rootTitle = $title;
+                               }
                        } else {
                                $this->dieUsageMsg(array('missingparam', 'title'));
                        }