From 75df732510cd2a5eb81290fe581a0039caba7987 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 2 Dec 2018 19:14:36 +0100 Subject: [PATCH] Delete always true condition Found by PHPStan. Change-Id: I3198b9ab568f469e32b3a511d8a0506fcc030fee --- includes/filerepo/file/ForeignAPIFile.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/filerepo/file/ForeignAPIFile.php b/includes/filerepo/file/ForeignAPIFile.php index 4c1bc4d292..aff0e3f1bd 100644 --- a/includes/filerepo/file/ForeignAPIFile.php +++ b/includes/filerepo/file/ForeignAPIFile.php @@ -77,9 +77,7 @@ class ForeignAPIFile extends File { if ( $lastRedirect >= 0 ) { $newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to'] ); $img = new self( $newtitle, $repo, $info, true ); - if ( $img ) { - $img->redirectedFrom( $title->getDBkey() ); - } + $img->redirectedFrom( $title->getDBkey() ); } else { $img = new self( $title, $repo, $info, true ); } -- 2.20.1