Skip to content

Commit 967fa51

Browse files
committed
Don't use uniqid for temporary POST data files
uniqid() is not necessarily unique when multiple testing processes run in parallel.
1 parent e5304bb commit 967fa51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ function run_test($php, $file, $env)
19731973
$temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'clean.php';
19741974
$test_clean = $test_dir . DIRECTORY_SEPARATOR . $main_file_name . 'clean.php';
19751975
$preload_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'preload.php';
1976-
$tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('/phpt.');
1976+
$tmp_post = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'post';
19771977
$tmp_relative_file = str_replace(__DIR__ . DIRECTORY_SEPARATOR, '', $test_file) . 't';
19781978

19791979
if ($temp_source && $temp_target) {

0 commit comments

Comments
 (0)