]> granicus.if.org Git - php/commitdiff
don't leave garbage in tmp dir
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Jun 2006 18:55:37 +0000 (18:55 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Jun 2006 18:55:37 +0000 (18:55 +0000)
ext/standard/tests/file/file_get_contents.phpt

index f481d43532a559c1b2931a5cd27b92a837d55d43..30c54dc8b240bd32db28989fcd0f41a5d70e7b4d 100644 (file)
@@ -2,8 +2,9 @@
 file_get_contents() leaks on empty file
 --FILE--
 <?php
-    $tmpfname = tempnam(sys_get_temp_dir(), "emptyfile");
-    echo file_get_contents($tmpfname), "done.";
+       $tmpfname = tempnam(sys_get_temp_dir(), "emptyfile");
+       echo file_get_contents($tmpfname), "done.";
+       unlink($tmpfname);
 ?>
 --EXPECT--
 done.