Index: trunk/extensions/Translate/utils/TranslateYaml.php |
— | — | @@ -41,10 +41,12 @@ |
42 | 42 | file_put_contents( $tf, $data ); |
43 | 43 | |
44 | 44 | $cmd = "perl -MYAML::Syck=LoadFile -MPHP::Serialization=serialize -wle '" . |
45 | | - "my \$yaml = LoadFile(\"$tf\");" . |
46 | | - "open my \$fh, q[>], q[$tf.serialized] or die qq[Can not open $tf.serialized];" . |
47 | | - "print \$fh serialize(\$yaml);" . |
48 | | - "close(\$fh);' 2>&1"; |
| 45 | + 'my $tf = q[' . $tf . '];' . |
| 46 | + 'my $yaml = LoadFile($tf);' . |
| 47 | + 'open my $fh, ">", "$tf.serialized" or die qq[Can not open "$tf.serialized"];' . |
| 48 | + 'print $fh serialize($yaml);' . |
| 49 | + 'close($fh);' . |
| 50 | + "' 2>&1"; |
49 | 51 | $out = wfShellExec( $cmd, &$ret ); |
50 | 52 | if ( $ret != 0 ) { |
51 | 53 | wfDebugDieBacktrace("The command '$cmd' died in execution with exit code '$ret': $out"); |