mirror of
https://github.com/php/php-src.git
synced 2025-01-03 17:33:32 +08:00
Don't leave behind temporary file in bug70362.phpt
This commit is contained in:
parent
4ebc04ca9d
commit
2a334f1655
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user