Permalink
Browse files

Get POST and CLEAN sections to work if path has spaces in it.

  • Loading branch information...
convissor committed Jan 12, 2012
1 parent 2e5fc1b commit 01071ee7b71e4d38c4e96fdf0ae5e411841eaec7
Showing with 3 additions and 3 deletions.
  1. +3 −3 PEAR/RunTest.php
View
@@ -459,7 +459,7 @@ function run($file, $ini_settings_cmd_line = array(), $test_number = 1)
$env['REQUEST_METHOD'] = 'POST';
$this->save_text($tmp_post, $request);
- $cmd = "$this->_php $pass_options $ini_settings_all \"$temp_file\" 2>&1 < $tmp_post";
+ $cmd = "$this->_php $pass_options $ini_settings_all \"$temp_file\" 2>&1 < \"$tmp_post\"";
} elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) {
$post = trim($section_text['POST']);
$this->save_text($tmp_post, $post);
@@ -469,7 +469,7 @@ function run($file, $ini_settings_cmd_line = array(), $test_number = 1)
$env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
- $cmd = "$this->_php $pass_options $ini_settings_all \"$temp_file\" 2>&1 < $tmp_post";
+ $cmd = "$this->_php $pass_options $ini_settings_all \"$temp_file\" 2>&1 < \"$tmp_post\"";
} else {
$env['REQUEST_METHOD'] = 'GET';
$env['CONTENT_TYPE'] = '';
@@ -960,7 +960,7 @@ function _testCleanup($section_text, $temp_clean)
if ($section_text['CLEAN']) {
// perform test cleanup
$this->save_text($temp_clean, $section_text['CLEAN']);
- $output = $this->system_with_timeout("$this->_php $temp_clean 2>&1");
+ $output = $this->system_with_timeout("$this->_php \"$temp_clean\" 2>&1");
if (strlen($output[1])) {
echo "BORKED --CLEAN-- section! output:\n", $output[1];
}

0 comments on commit 01071ee

Please sign in to comment.