ID: 42151
Updated by: [EMAIL PROTECTED]
Reported By: mattsch at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: Gentoo Linux
PHP Version: 5.2.3
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2007-07-30 22:24:29] mattsch at gmail dot com
Description:
------------
All __destruct functions of all objects in memory are not called if a
SoapFault exception is thrown and caught.
Reproduce code:
---------------
<?php
class foo {
function __construct(){
$foo = new SoapClient('http://php.net/problem_file.wsdl');
}
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";
}
?>
Expected result:
----------------
SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://php.net/problem_file.wsdl'
I never get executed.
I don't get executed either.
Actual result:
--------------
SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://php.net/problem_file.wsdl'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42151&edit=1