API: Fix E_NOTICE. !is_null() and isset() are not equivalent when indexing arrays
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 30 Jan 2010 12:09:28 +0000 (12:09 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 30 Jan 2010 12:09:28 +0000 (12:09 +0000)
includes/api/ApiQueryUserContributions.php

index 424de99..f1ca232 100644 (file)
@@ -255,7 +255,7 @@ class ApiQueryContributions extends ApiQueryBase {
                        $this->addFields( 'ts_tags' );
                }
                
-               if ( !is_null( $this->params['tag'] ) ) {
+               if ( isset( $this->params['tag'] ) ) {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) ) );
                        $this->addWhereFld( 'ct_tag', $this->params['tag'] );