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: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/%22%24ccApp/%28%5B%5E/%7B%24admin_url%7Dcompta/comptes/%28?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 ); }