diff --git a/ext/soap/soap.c b/ext/soap/soap.c index ef00324d8afe..1084f9c691cf 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1336,8 +1336,6 @@ PHP_METHOD(SoapServer, handle) } } - ZVAL_NULL(&retval); - if (php_output_start_default() != SUCCESS) { php_error_docref(NULL, E_ERROR,"ob_start failed"); } @@ -1388,7 +1386,6 @@ PHP_METHOD(SoapServer, handle) php_stream_filter_remove(zf, 1); } } else { - zval_ptr_dtor(&retval); SOAP_SERVER_END_CODE(); return; } @@ -1434,6 +1431,8 @@ PHP_METHOD(SoapServer, handle) xmlFreeDoc(doc_request); + ZVAL_NULL(&retval); + if (EG(exception)) { if (!zend_is_unwind_exit(EG(exception))) { php_output_discard();