r61901 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61900‎ | r61901 | r61902 >
Date:02:19, 3 February 2010
Author:mah
Status:ok
Tags:
Comment:
follow up r61779 - anyone who writes "!$x == null" is an idiot
Modified paths:
  • /trunk/phase3/includes/upload/UploadFromChunks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromChunks.php
@@ -38,7 +38,7 @@
3939 }
4040
4141 public function initialize( $done, $filename, $sessionKey, $path,
42 - $fileSize, $sessionData )
 42+ $fileSize, $sessionData )
4343 {
4444 $this->initFromSessionKey( $sessionKey, $sessionData );
4545
@@ -90,14 +90,14 @@
9191 protected function initFromSessionKey( $sessionKey, $sessionData ) {
9292 // testing against null because we don't want to cause obscure
9393 // bugs when $sessionKey is full of "0"
94 - if ( !$sessionKey === null ) {
 94+ if ( $sessionKey !== null ) {
9595 $this->status = Status::newFromFatal( 'import-token-mismatch' );
9696 return;
9797 }
9898 $this->sessionKey = $sessionKey;
9999
100100 if ( isset( $sessionData[$this->sessionKey]['version'] )
101 - && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION )
 101+ && $sessionData[$this->sessionKey]['version'] == self::SESSION_VERSION )
102102 {
103103 $this->comment = $sessionData[$this->sessionKey]['comment'];
104104 $this->pageText = $sessionData[$this->sessionKey]['pageText'];
@@ -211,7 +211,7 @@
212212 } else {
213213 $this->status = Status::newFatal( 'filenotfound', $this->repoPath );
214214 }
215 - if ( $this->fileSize > $wgMaxUploadSize )
 215+ if ( $this->fileSize > $wgMaxUploadSize )
216216 $this->status = Status::newFatal( 'largefileserver' );
217217 }
218218

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61779follow up r61355, initial, incomplete dealing with TimStarlings CRmah07:05, 1 February 2010

Status & tagging log