1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix tempnam() path in test when running from out-of-source (#14326)

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
```
This commit is contained in:
Peter Kokot
2024-05-25 23:08:40 +02:00
committed by GitHub
parent 8a24e31bef
commit 1b78121928

View File

@@ -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);