diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-07 16:16:25 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-07 16:16:25 +0200 |
commit | a249980006477ee48b44fa26a3b3d48c4c24633c (patch) | |
tree | 31ded76e617ec5c7352bd8b5ac69dfcd9b839921 /ext/standard/tests/streams | |
parent | 032f862133dbd2acc04cb75004428d6209f6046b (diff) | |
parent | 2a334f165541e6f1efa5a9c7e927e689f4c47f3f (diff) | |
download | php-git-a249980006477ee48b44fa26a3b3d48c4c24633c.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Don't leave behind temporary file in bug70362.phpt
Diffstat (limited to 'ext/standard/tests/streams')
-rw-r--r-- | ext/standard/tests/streams/bug70362.phpt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/standard/tests/streams/bug70362.phpt b/ext/standard/tests/streams/bug70362.phpt index 3fbc3fea16..fa05ecdef5 100644 --- a/ext/standard/tests/streams/bug70362.phpt +++ b/ext/standard/tests/streams/bug70362.phpt @@ -4,11 +4,16 @@ Bug #70362 (Can't copy() large 'data://' with open_basedir) open_basedir=. --FILE-- <?php -$temp = tempnam(__DIR__, 'test'); +$file = __DIR__ . '/bug70362.txt'; $data = str_repeat('0', 4096); $data = 'data://plain/text;base64,' . base64_encode($data); -var_dump(copy($data, $temp)); -echo file_get_contents($temp); +var_dump(copy($data, $file)); +echo file_get_contents($file); +?> +--CLEAN-- +<?php +$file = __DIR__ . '/bug70362.txt'; +@unlink($file); ?> --EXPECT-- bool(true) |