summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/bug42560.phpt
blob: 286ced6ff06279cccd7dc62f9b2513dd47233815 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #42560 Empty directory argument to tempnam yields open_basedir problems
--FILE--
<?php
$tmpdir = sys_get_temp_dir();
ini_set('open_basedir', $tmpdir);
$tempnam = tempnam('', 'test');
var_dump($tempnam !== false);
var_dump(file_exists($tempnam));

if (file_exists($tempnam)) {
    unlink($tempnam);
}
?>
--EXPECT--
bool(true)
bool(true)