summaryrefslogtreecommitdiff
path: root/Zend/tests/bug26698.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-27 20:45:36 +0000
committerMarcus Boerger <helly@php.net>2003-12-27 20:45:36 +0000
commitc49b6570844ac659f8f2f48a3eead31c57e352f9 (patch)
tree9ea7679c624df2ae740393f69bdf17fbab206c97 /Zend/tests/bug26698.phpt
parente20f534ee5fd5b6288aae5ca14bf9bf1d5f46185 (diff)
downloadphp-git-c49b6570844ac659f8f2f48a3eead31c57e352f9.tar.gz
Add new test
Diffstat (limited to 'Zend/tests/bug26698.phpt')
-rwxr-xr-xZend/tests/bug26698.phpt71
1 files changed, 71 insertions, 0 deletions
diff --git a/Zend/tests/bug26698.phpt b/Zend/tests/bug26698.phpt
new file mode 100755
index 0000000000..c55cb596cd
--- /dev/null
+++ b/Zend/tests/bug26698.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Bug #26698 (Thrown exceptions while evaluting argument to pass as parameter crash PHP)
+--FILE--
+<?php
+
+class Object
+{
+ function getNone()
+ {
+ throw new Exception('NONE');
+ }
+}
+
+class Proxy
+{
+ function three($a, $b, $c)
+ {
+ }
+
+ function callOne()
+ {
+ try
+ {
+ $res = new Object();
+ $this->three($res->getNone());
+ }
+ catch(Exception $e)
+ {
+ echo 'Caught: '.$e->getMessage()."\n";
+ }
+ }
+
+ function callTwo()
+ {
+ try
+ {
+ $res = new Object();
+ $this->three(1, $res->getNone());
+ }
+ catch(Exception $e)
+ {
+ echo 'Caught: '.$e->getMessage()."\n";
+ }
+ }
+
+ function callThree()
+ {
+ try
+ {
+ $res = new Object();
+ $this->three(1, 2, $res->getNone());
+ }
+ catch(Exception $e)
+ {
+ echo 'Caught: '.$e->getMessage()."\n";
+ }
+ }
+}
+
+$p = new Proxy();
+
+$p->callOne();
+$p->callTwo();
+$p->callThree();
+?>
+===DONE===
+--EXPECT--
+Caught: NONE
+Caught: NONE
+Caught: NONE
+===DONE===