From: Reedy Date: Sat, 20 Oct 2012 02:23:27 +0000 (+0100) Subject: Bug 41234 - api prop=imageinfo broken on PHP 5.4 X-Git-Tag: 1.31.0-rc.0~21934^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27user_edit%27%2C%20userid=session.user.id%29%20%7D%7D?a=commitdiff_plain;h=25231f842e14fab7b7b0ecc9795215e4dd3c9297;p=lhc%2Fweb%2Fwiklou.git Bug 41234 - api prop=imageinfo broken on PHP 5.4 Fix by Roan Change-Id: I14d8da45f7655ded501e3dd48dbdd424ecacc885 --- diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index ee55fb5476..de0261413f 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -172,7 +172,7 @@ class ApiQueryImageInfo extends ApiQueryBase { $data = $this->getResultData(); foreach ( $data['query']['pages'] as $pageid => $arr ) { - if ( !isset( $arr['imagerepository'] ) ) { + if ( is_array( $arr ) && !isset( $arr['imagerepository'] ) ) { $result->addValue( array( 'query', 'pages', $pageid ), 'imagerepository', ''