]> granicus.if.org Git - php/commitdiff
add test for file_get_contents() leaking on empty file
authorHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 18:46:14 +0000 (18:46 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 18:46:14 +0000 (18:46 +0000)
ext/standard/tests/file/file_get_contents.phpt [new file with mode: 0644]

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