Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php |
— | — | @@ -600,16 +600,16 @@ |
601 | 601 | global $wgPhpCli; |
602 | 602 | return array( |
603 | 603 | array( 'eval.php', array( '--help', '--test' ), array(), |
604 | | - "$wgPhpCli eval.php '--help' '--test'", |
| 604 | + "'$wgPhpCli' 'eval.php' '--help' '--test'", |
605 | 605 | "Called eval.php --help --test" ), |
606 | 606 | array( 'eval.php', array( '--help', '--test space' ), array('php' => 'php5'), |
607 | | - "php5 eval.php '--help' '--test space'", |
| 607 | + "'php5' 'eval.php' '--help' '--test space'", |
608 | 608 | "Called eval.php --help --test with php option" ), |
609 | 609 | array( 'eval.php', array( '--help', '--test', 'X' ), array('wrapper' => 'MWScript.php'), |
610 | | - "$wgPhpCli MWScript.php eval.php '--help' '--test' 'X'", |
| 610 | + "'$wgPhpCli' 'MWScript.php' 'eval.php' '--help' '--test' 'X'", |
611 | 611 | "Called eval.php --help --test with wrapper option" ), |
612 | 612 | array( 'eval.php', array( '--help', '--test', 'y' ), array('php' => 'php5', 'wrapper' => 'MWScript.php'), |
613 | | - "php5 MWScript.php eval.php '--help' '--test' 'y'", |
| 613 | + "'php5' 'MWScript.php' 'eval.php' '--help' '--test' 'y'", |
614 | 614 | "Called eval.php --help --test with wrapper and php option" ), |
615 | 615 | ); |
616 | 616 | } |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2929,8 +2929,8 @@ |
2930 | 2930 | $cmd[] = $options['wrapper']; |
2931 | 2931 | } |
2932 | 2932 | $cmd[] = $script; |
2933 | | - // Build up the full command, shell escaping each parameter |
2934 | | - return implode( ' ', array_merge( $cmd, array_map( 'wfEscapeShellArg', $parameters ) ) ); |
| 2933 | + // Escape each parameter for shell |
| 2934 | + return implode( " ", array_map( 'wfEscapeShellArg', array_merge( $cmd, $parameters ) ) ); |
2935 | 2935 | } |
2936 | 2936 | |
2937 | 2937 | /** |