summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2012-01-01 22:45:58 +0000
committerNuno Lopes <nlopess@php.net>2012-01-01 22:45:58 +0000
commit8b23cae172e265b4cc47cec104cacdce0a7c2dbc (patch)
tree38cb6beb1c424d0b827f3e4cb1f1585277723b23 /tests
parent4e198252811dbf16984cf84ee49d5e93ac642f88 (diff)
downloadphp-git-8b23cae172e265b4cc47cec104cacdce0a7c2dbc.tar.gz
fix memory leak in compile_string when there's a parse error (used e.g. in eval or assert)
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/019.phpt8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/lang/019.phpt b/tests/lang/019.phpt
index 6c0a1cab62..be65fb0db8 100644
--- a/tests/lang/019.phpt
+++ b/tests/lang/019.phpt
@@ -3,8 +3,6 @@ eval() test
--FILE--
<?php
-error_reporting(0);
-
eval("function test() { echo \"hey, this is a function inside an eval()!\\n\"; }");
$i=0;
@@ -13,7 +11,9 @@ while ($i<10) {
test();
$i++;
}
---EXPECT--
+
+eval('-');
+--EXPECTF--
hey, this is a regular echo'd eval()
hey, this is a function inside an eval()!
hey, this is a regular echo'd eval()
@@ -34,3 +34,5 @@ hey, this is a regular echo'd eval()
hey, this is a function inside an eval()!
hey, this is a regular echo'd eval()
hey, this is a function inside an eval()!
+
+Parse error: syntax error, unexpected end of file in %s019.php(12) : eval()'d code on line 1