From c5096e53cdaad3f12764f996d19248b174d2521e Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 30 Sep 2009 00:38:32 +0000 Subject: [PATCH] Followup r56731, check for PHP 5.3 or greater (where it was fixed). Not a Windows issue --- includes/GlobalFunctions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a69cab0890..c23a64c860 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2326,9 +2326,12 @@ function wfShellExec( $cmd, &$retval=null ) { $cmd = escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd ); } } - } elseif ( php_uname( 's' ) == 'Windows NT' && substr( php_uname( 'v' ), 6, 4 ) <= 6001 ) { + } elseif ( php_uname( 's' ) == 'Windows NT' && + version_compare( PHP_VERSION, '5.3.0', '<' ) ) + { # This is a hack to work around PHP's flawed invocation of cmd.exe # http://news.php.net/php.internals/21796 + # Which is fixed in 5.3.0 :) $cmd = '"' . $cmd . '"'; } wfDebug( "wfShellExec: $cmd\n" ); -- 2.20.1