]> granicus.if.org Git - php/commitdiff
MFH: test for file_get_contents leaking on empty file
authorHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 18:48:56 +0000 (18:48 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 20 Jun 2006 18:48:56 +0000 (18:48 +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..1a7b2eb
--- /dev/null
@@ -0,0 +1,9 @@
+--TEST--
+file_get_contents() leaks on empty file
+--FILE--
+<?php
+    $tmpfname = tempnam("/tmp", "emptyfile");
+    echo file_get_contents($tmpfname), "done.";
+?>
+--EXPECT--
+done.