r58410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58409‎ | r58410 | r58411 >
Date:21:49, 1 November 2009
Author:siebrand
Status:ok
Tags:
Comment:
Should fix Undefined index: tag in includes/api/ApiQueryRevisions.php on line 152 from r58399.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryRevisions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRevisions.php
@@ -149,7 +149,7 @@
150150 $this->addFields('ts_tags');
151151 }
152152
153 - if( !is_null($params['tag']) ) {
 153+ if( isset( $params['tag'] ) && !is_null( $params['tag'] ) ) {
154154 $this->addTables('change_tag');
155155 $this->addJoinConds(array('change_tag' => array('INNER JOIN', array('rev_id=ct_rev_id'))));
156156 $this->addWhereFld('ct_tag' , $params['tag']);

Follow-up revisions

RevisionCommit summaryAuthorDate
r58411Fix for r58410: isset already checks for null, no need to do a double check :)ialex21:54, 1 November 2009
r58419Redo r58410, r58411 (attempts to to fix r58399) properly: isset vs. !is_null ...catrope08:29, 2 November 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58399API: (bug 19004) Add support for tags. Patch by Matthew Brittoncatrope10:42, 1 November 2009

Status & tagging log