From: Jakub Vrana Date: Sun, 2 Dec 2018 18:28:11 +0000 (+0100) Subject: Delete always true condition X-Git-Tag: 1.34.0-rc.0~3366^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=711dc538ddf217b0c5552d26ddb1b1ef6b9a6061;p=lhc%2Fweb%2Fwiklou.git Delete always true condition The typehint doesn't allow null here. Found by PHPStan. Change-Id: I3e30bf49e778c42e8313a5b6de3d943ed7002c81 --- diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index ee6f250a76..58541b236a 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -54,11 +54,7 @@ class UploadFromChunks extends UploadFromFile { if ( $stash ) { $this->stash = $stash; } else { - if ( $user ) { - wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" ); - } else { - wfDebug( __METHOD__ . " creating new UploadFromChunks instance with no user\n" ); - } + wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" ); $this->stash = new UploadStash( $this->repo, $this->user ); } }