]> granicus.if.org Git - php/commitdiff
Test for bug #37864 (file_get_contents() leaks on empty file)
authorHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 19:30:19 +0000 (19:30 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 19:30:19 +0000 (19:30 +0000)
ext/standard/tests/file/bug37864.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/file/bug37864.phpt b/ext/standard/tests/file/bug37864.phpt
new file mode 100644 (file)
index 0000000..be67352
--- /dev/null
@@ -0,0 +1,10 @@
+--TEST--
+Bug #37864 (file_get_contents() leaks on empty file)
+--FILE--
+<?php
+       $tmpfname = tempnam(sys_get_temp_dir(), "emptyfile");
+       echo file_get_contents($tmpfname), "done.";
+       unlink($tmpfname);
+?>
+--EXPECT--
+done.