Skip to content

Commit

Permalink
Get POST and CLEAN sections to work if path has spaces in it.
Browse files Browse the repository at this point in the history
  • Loading branch information
convissor committed Jan 12, 2012
1 parent 2e5fc1b commit 01071ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PEAR/RunTest.php
Expand Up @@ -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);
Expand All @@ -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'] = '';
Expand Down Expand Up @@ -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];
}
Expand Down

0 comments on commit 01071ee

Please sign in to comment.