summaryrefslogtreecommitdiff
path: root/Zend/tests/bug69212.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-03-10 18:17:56 +0100
committerNikita Popov <nikic@php.net>2015-03-10 18:17:56 +0100
commitbc9f2fb8dfadc1dba4264695ded28f673c54dc75 (patch)
tree9726c2b22f790f5872360ae679692acd773b3890 /Zend/tests/bug69212.phpt
parentc814b3294ad72baad8d9da52dbef81dcafded451 (diff)
downloadphp-git-bc9f2fb8dfadc1dba4264695ded28f673c54dc75.tar.gz
Fixed bug #69212
Diffstat (limited to 'Zend/tests/bug69212.phpt')
-rw-r--r--Zend/tests/bug69212.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/Zend/tests/bug69212.phpt b/Zend/tests/bug69212.phpt
new file mode 100644
index 0000000000..801073e2ca
--- /dev/null
+++ b/Zend/tests/bug69212.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #69212: Leaking VIA_HANDLER func when exception thrown in __call/... arg passing
+--FILE--
+<?php
+
+class Test {
+ public static function __callStatic($method, $args) {}
+ public function __call($method, $args) {}
+}
+
+function do_throw() { throw new Exception; }
+
+try {
+ Test::foo(do_throw());
+} catch (Exception $e) {
+ echo "Caught!\n";
+}
+try {
+ (new Test)->bar(do_throw());
+} catch (Exception $e) {
+ echo "Caught!\n";
+}
+
+?>
+--EXPECT--
+Caught!
+Caught!