From: Jakub Vrana Date: Sun, 2 Dec 2018 18:14:36 +0000 (+0100) Subject: Delete always true condition X-Git-Tag: 1.34.0-rc.0~3357^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=75df732510cd2a5eb81290fe581a0039caba7987;p=lhc%2Fweb%2Fwiklou.git Delete always true condition Found by PHPStan. Change-Id: I3198b9ab568f469e32b3a511d8a0506fcc030fee --- 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 ); }