Skip to content

Commit 3060edf

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix file test race condition
2 parents 945c512 + a742010 commit 3060edf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/standard/tests/file/005_variation2.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ function stat_fn( $filename ) {
2828

2929
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
3030
echo "\n*** testing touch ***\n";
31+
32+
$dir = __DIR__ . '/005_variation2';
33+
mkdir($dir);
34+
chdir($dir);
35+
3136
$b = touch(false);
3237
$c = touch('');
3338
$d = touch(' ');
@@ -47,6 +52,7 @@ stat_fn('|');
4752

4853
var_dump(unlink(' '));
4954
var_dump(unlink('|'));
55+
rmdir($dir);
5056

5157
echo "Done";
5258
?>

0 commit comments

Comments
 (0)