r65957 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65956‎ | r65957 | r65958 >
Date:18:08, 5 May 2010
Author:demon
Status:ok
Tags:
Comment:
FormatJson::decode() returns an object, not an array
Modified paths:
  • /branches/new-installer/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/Installer.php
@@ -361,15 +361,15 @@
362362 return;
363363 }
364364 $latestInfo = FormatJson::decode($latestInfo);
365 - if ($latestInfo === false || !isset( $latestInfo['mwreleases'] ) ) {
 365+ if ($latestInfo === false || !isset( $latestInfo->mwreleases ) ) {
366366 # For when the request is successful but there's e.g. some silly man in
367367 # the middle firewall blocking us, e.g. one of those annoying airport ones
368368 $this->showMessage( 'config-env-latest-data-invalid', $latestInfoUrl );
369369 return;
370370 }
371 - foreach( $latestInfo['mwreleases'] as $rel ) {
372 - if( isset( $rel['current'] ) )
373 - $currentVersion = $rel['version'];
 371+ foreach( $latestInfo->mwreleases as $rel ) {
 372+ if( isset( $rel->current ) )
 373+ $currentVersion = $rel->version;
374374 }
375375 if( version_compare( $wgVersion, $currentVersion, '<' ) ) {
376376 $this->showMessage( 'config-env-latest-old' );

Status & tagging log