+ if ( is_array( $cmd ) ) {
+ // Command line may be given as an array, escape each value and glue them together with a space
+ $cmdVals = array();
+ foreach ( $cmd as $val ) {
+ $cmdVals[] = wfEscapeShellArg( $val );
+ }
+ $cmd = implode( ' ', $cmdVals );
+ }
+