From: Aaron Schulz Date: Wed, 4 Jun 2008 23:24:25 +0000 (+0000) Subject: Title may come in as an empty string, which is not null, so the previous fails and... X-Git-Tag: 1.31.0-rc.0~47164 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=d808746a74b896cea6ab05dac2118dedecab7a86;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 3483742f8e..959c9fa339 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -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')); }