summaryrefslogtreecommitdiff
path: root/ext/soap/tests
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-08-01 10:39:49 +0000
committerDmitry Stogov <dmitry@php.net>2007-08-01 10:39:49 +0000
commit54305825869e32a4fb5b2d6f815c94ab5aea2a8d (patch)
tree8a91a54e442e266f7675d2351acee06abb1e4eda /ext/soap/tests
parent3f29f3fbd6e4ca63f61a78298557a4d95b61aa4d (diff)
downloadphp-git-54305825869e32a4fb5b2d6f815c94ab5aea2a8d.tar.gz
Fixed bug #42151 (__destruct functions not called after catching a SoapFault exception)
Diffstat (limited to 'ext/soap/tests')
-rwxr-xr-xext/soap/tests/bugs/bug42151.phpt31
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/soap/tests/bugs/bug42151.phpt b/ext/soap/tests/bugs/bug42151.phpt
new file mode 100755
index 0000000000..7f7a87bd15
--- /dev/null
+++ b/ext/soap/tests/bugs/bug42151.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #42151 __destruct functions not called after catching a SoapFault exception
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+class foo {
+ function __construct(){
+ $foo = @ new SoapClient('httpx://');
+ }
+ function __destruct(){
+ echo 'I never get executed.' . "\n";
+ }
+}
+class bar {
+ function __destruct(){
+ echo 'I don\'t get executed either.' . "\n";
+ }
+}
+try {
+ $bar = new bar();
+ $foo = new foo();
+} catch (Exception $e){
+ echo $e->getMessage() . "\n";
+}
+echo "ok\n";
+?>
+--EXPECT--
+SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://'
+ok
+I don't get executed either.