diff options
author | Nikita Popov <nikic@php.net> | 2015-03-10 18:17:56 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-03-10 18:17:56 +0100 |
commit | bc9f2fb8dfadc1dba4264695ded28f673c54dc75 (patch) | |
tree | 9726c2b22f790f5872360ae679692acd773b3890 /Zend/tests/bug69212.phpt | |
parent | c814b3294ad72baad8d9da52dbef81dcafded451 (diff) | |
download | php-git-bc9f2fb8dfadc1dba4264695ded28f673c54dc75.tar.gz |
Fixed bug #69212
Diffstat (limited to 'Zend/tests/bug69212.phpt')
-rw-r--r-- | Zend/tests/bug69212.phpt | 27 |
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! |