cvs: php-src /ext/standard/tests/file file_get_contents.phpt
| From: | Antony Dovgal | Date: | Tue, 20 Jun 2006 18:55:37 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/file file_get_contents.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-38828@lists.php.net to get a copy of this message | ||
tony2001 Tue Jun 20 18:55:37 2006 UTC
Modified files:
/php-src/ext/standard/tests/file file_get_contents.phpt
Log:
don't leave garbage in tmp dir
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_get_contents.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/file/file_get_contents.phpt
diff -u php-src/ext/standard/tests/file/file_get_contents.phpt:1.1
php-src/ext/standard/tests/file/file_get_contents.phpt:1.2
--- php-src/ext/standard/tests/file/file_get_contents.phpt:1.1 Tue Jun 20 18:46:14 2006
+++ php-src/ext/standard/tests/file/file_get_contents.phpt Tue Jun 20 18:55:37 2006
@@ -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.