r75730 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75729‎ | r75730 | r75731 >
Date:18:22, 31 October 2010
Author:hartman
Status:ok (Comments)
Tags:
Comment:
Using isset to check for index value. Avoids a PHP notice.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -185,7 +185,7 @@
186186 'prop' => 'imageinfo' ) );
187187 $info = $this->getImageInfo( $data );
188188
189 - if( $data && $info && $info['thumburl'] ) {
 189+ if( $data && $info && isset( $info['thumburl'] ) ) {
190190 wfDebug( __METHOD__ . " got remote thumb " . $info['thumburl'] . "\n" );
191191 return $info['thumburl'];
192192 } else {

Comments

#Comment by Bryan (talk | contribs)   21:58, 1 December 2010

I presume that old MW APIs do not set the thumburl?

Status & tagging log