From 750877436b8f0389ae876280b5087dc2117a8570 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 1 Jul 2009 20:08:54 +0000 Subject: [PATCH] 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) --- includes/specials/SpecialVersion.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 414aa8ae16..a8436503b3 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -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] ); -- 2.20.1