Skip to content

Commit

Permalink
Fix tempnam() path in test when running from out-of-source (#14326)
Browse files Browse the repository at this point in the history
This fixes test when running the test from unusual paths such as in
out-of-source builds:

```sh
mkdir php-build
cd php-build
../buildconf
../configure
make
./sapi/cli/php ../run-tests.php ../ext/standard/tests/file/002.phpt
```
  • Loading branch information
petk authored May 25, 2024
1 parent 8a24e31 commit 1b78121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/standard/tests/file/002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
EOD;

$name = tempnam("./ext/standard/tests/file/", "php");
$name = tempnam(__DIR__, "php");
$fp = fopen($name, "w");
fwrite($fp, $data);
fclose($fp);
Expand Down

0 comments on commit 1b78121

Please sign in to comment.