Followup r56731, check for PHP 5.3 or greater (where it was fixed). Not a Windows...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 30 Sep 2009 00:38:32 +0000 (00:38 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 30 Sep 2009 00:38:32 +0000 (00:38 +0000)
includes/GlobalFunctions.php

index a69cab0..c23a64c 100644 (file)
@@ -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" );