Skip to content

Commit cee9708

Browse files
committed
Fixed bug #50836 (run_tests.php alerts syntax errors while testing session)
1 parent c204922 commit cee9708

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

run-tests.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,7 +2161,17 @@ function settings2params(&$ini_settings)
21612161
$settings .= " -d \"$name=$val\"";
21622162
}
21632163
} else {
2164-
$value = addslashes($value);
2164+
if (substr(PHP_OS, 0, 3) == "WIN" && !empty($value) && $value{0} == '"') {
2165+
$len = strlen($value);
2166+
2167+
if ($value{$len - 1} == '"') {
2168+
$value{0} = "'";
2169+
$value{$len - 1} = "'";
2170+
}
2171+
} else {
2172+
$value = addslashes($value);
2173+
}
2174+
21652175
$settings .= " -d \"$name=$value\"";
21662176
}
21672177
}

0 commit comments

Comments
 (0)