r72131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72130‎ | r72131 | r72132 >
Date:18:08, 1 September 2010
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
partially reverting self. This isset() is actually needed, since the variable can be an empty string and we'll still want to pass it to updateProjectName()
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -614,7 +614,7 @@
615615
616616 // Handle new project name
617617 $projectName = $wgRequest->getVal( 'project_name' );
618 - if ( $projectName ) {
 618+ if ( isset( $projectName ) ) {
619619 $this->updateProjectName ( $notice, $projectName );
620620 }
621621

Follow-up revisions

RevisionCommit summaryAuthorDate
r72203switching isset() to !== null per comment at r72131kaldari17:15, 2 September 2010

Comments

#Comment by Nikerabbit (talk | contribs)   18:17, 1 September 2010

!== null?

#Comment by Ryan Kaldari (WMF) (talk | contribs)   23:39, 1 September 2010

Is there an advantage to using !==null over isset() ? I just changed it back to isset() since that's what was being used before.

#Comment by Nikerabbit (talk | contribs)   07:10, 2 September 2010

isset() also hides spelling errors, so it is against do (only) what is intented practice :))

#Comment by Ryan Kaldari (WMF) (talk | contribs)   17:16, 2 September 2010

Ah, that makes sense. Fixed in r72203.

Status & tagging log