summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-11-01 15:41:25 +0000
committerDmitry Stogov <dmitry@php.net>2007-11-01 15:41:25 +0000
commitdb3496fac8e7259e4ef05e2b0791cc577800d3c1 (patch)
treeb33ab3efa717e960842783b8466c6401167db027
parent2f51afe2c6811454effa7be1124a78f8003f4187 (diff)
downloadphp-git-db3496fac8e7259e4ef05e2b0791cc577800d3c1.tar.gz
Another fix for bug #42773
-rw-r--r--ext/soap/soap.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 1b3c89736d..d981396a00 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2072,14 +2072,17 @@ static void soap_server_fault(char* code, char* string, char *actor, zval* detai
static void soap_error_handler(int error_num, const char *error_filename, const uint error_lineno, const char *format, va_list args)
{
- zend_bool _old_in_compilation, _old_in_execution, _old_headers_sent;
+ zend_bool _old_in_compilation, _old_in_execution;
zend_execute_data *_old_current_execute_data;
+ int _old_http_response_code;
+ char *_old_http_status_line;
TSRMLS_FETCH();
_old_in_compilation = CG(in_compilation);
_old_in_execution = EG(in_execution);
_old_current_execute_data = EG(current_execute_data);
- _old_headers_sent = SG(headers_sent);
+ _old_http_response_code = SG(sapi_headers).http_response_code;
+ _old_http_status_line = SG(sapi_headers).http_status_line;
if (!SOAP_GLOBAL(use_soap_error_handler)) {
call_old_error_handler(error_num, error_filename, error_lineno, format, args);
@@ -2137,14 +2140,18 @@ static void soap_error_handler(int error_num, const char *error_filename, const
old_objects = EG(objects_store).object_buckets;
EG(objects_store).object_buckets = NULL;
PG(display_errors) = 0;
- SG(headers_sent) = 1;
+ SG(sapi_headers).http_status_line = NULL;
zend_try {
call_old_error_handler(error_num, error_filename, error_lineno, format, args);
} zend_catch {
CG(in_compilation) = _old_in_compilation;
EG(in_execution) = _old_in_execution;
EG(current_execute_data) = _old_current_execute_data;
- SG(headers_sent) = _old_headers_sent;
+ if (SG(sapi_headers).http_status_line) {
+ efree(SG(sapi_headers).http_status_line);
+ }
+ SG(sapi_headers).http_status_line = _old_http_status_line;
+ SG(sapi_headers).http_response_code = _old_http_response_code;
} zend_end_try();
EG(objects_store).object_buckets = old_objects;
PG(display_errors) = old;
@@ -2217,14 +2224,18 @@ static void soap_error_handler(int error_num, const char *error_filename, const
}
PG(display_errors) = 0;
- SG(headers_sent) = 1;
+ SG(sapi_headers).http_status_line = NULL;
zend_try {
call_old_error_handler(error_num, error_filename, error_lineno, format, args);
} zend_catch {
CG(in_compilation) = _old_in_compilation;
EG(in_execution) = _old_in_execution;
EG(current_execute_data) = _old_current_execute_data;
- SG(headers_sent) = _old_headers_sent;
+ if (SG(sapi_headers).http_status_line) {
+ efree(SG(sapi_headers).http_status_line);
+ }
+ SG(sapi_headers).http_status_line = _old_http_status_line;
+ SG(sapi_headers).http_response_code = _old_http_response_code;
} zend_end_try();
PG(display_errors) = old;