From 711dc538ddf217b0c5552d26ddb1b1ef6b9a6061 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 2 Dec 2018 19:28:11 +0100 Subject: [PATCH] Delete always true condition The typehint doesn't allow null here. Found by PHPStan. Change-Id: I3e30bf49e778c42e8313a5b6de3d943ed7002c81 --- includes/upload/UploadFromChunks.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 ); } } -- 2.20.1