quick fix for r52624: handle the case when the executable isn't found, since it's...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 1 Jul 2009 20:08:54 +0000 (20:08 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 1 Jul 2009 20:08:54 +0000 (20:08 +0000)
includes/specials/SpecialVersion.php

index 414aa8a..a843650 100644 (file)
@@ -238,7 +238,8 @@ class SpecialVersion extends SpecialPage {
                                        $swWhereIsLine = explode( "\n", $swWhereIsInfo, 2);
                                        $swWhereIsFirstLine = $swWhereIsLine[0];
                                        $swWhereIsBinPath = explode( ' ', $swWhereIsFirstLine, 3);
-                                       $wBinPath = dirname( $swWhereIsBinPath[1] );
+                                       if ( count( $swWhereIsBinPath ) > 1 )
+                                               $wBinPath = dirname( $swWhereIsBinPath[1] );
                                }
                                if ( file_exists( $binPath . $swMathCmd ) || file_exists( $wBinPath . $swMathCmd ) ) {
                                        $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] );