r52646 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52645‎ | r52646 | r52647 >
Date:20:08, 1 July 2009
Author:ialex
Status:reverted
Tags:
Comment:
quick fix for r52624: handle the case when the executable isn't found, since it's throwing "PHP Notice: Undefined offset: 1 in /var/www/w/includes/specials/SpecialVersion.php on line 241" (on translatewiki.net)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -238,7 +238,8 @@
239239 $swWhereIsLine = explode( "\n", $swWhereIsInfo, 2);
240240 $swWhereIsFirstLine = $swWhereIsLine[0];
241241 $swWhereIsBinPath = explode( ' ', $swWhereIsFirstLine, 3);
242 - $wBinPath = dirname( $swWhereIsBinPath[1] );
 242+ if ( count( $swWhereIsBinPath ) > 1 )
 243+ $wBinPath = dirname( $swWhereIsBinPath[1] );
243244 }
244245 if ( file_exists( $binPath . $swMathCmd ) || file_exists( $wBinPath . $swMathCmd ) ) {
245246 $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] );

Follow-up revisions

RevisionCommit summaryAuthorDate
r52653added path value support on the file check on Special:Version....shinjiman21:31, 1 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52624added whereis path support instead of the hardcoded local binary path to get ...shinjiman13:48, 1 July 2009

Status & tagging log