2007-08-01 10:39:33 +00:00
|
|
|
--TEST--
|
2008-02-15 09:35:53 +00:00
|
|
|
Bug #42151 (__destruct functions not called after catching a SoapFault exception)
|
2007-08-01 10:39:33 +00:00
|
|
|
--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.
|