From: Dmitry Stogov Date: Thu, 2 Mar 2006 14:08:04 +0000 (+0000) Subject: Fixed bug #36388 (ext/soap crashes when throwing exception and session persistence... X-Git-Tag: RELEASE_1_2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63116203d7f624ce6b637fdb24f5609933fcd7f4;p=php Fixed bug #36388 (ext/soap crashes when throwing exception and session persistence). (David) --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d9bbf21d84..9d76adb9d8 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1726,7 +1726,13 @@ PHP_METHOD(SoapServer, handle) instanceof_function(Z_OBJCE_P(EG(exception)), soap_fault_class_entry TSRMLS_CC)) { soap_server_fault_ex(function, EG(exception), NULL TSRMLS_CC); } else { - if (soap_obj) {zval_ptr_dtor(&soap_obj);} +#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) + if (soap_obj && service->soap_class.persistance != SOAP_PERSISTENCE_SESSION) { +#else + if (soap_obj) { +#endif + zval_ptr_dtor(&soap_obj); + } php_end_ob_buffer(0, 0 TSRMLS_CC); goto fail; }