diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-06-28 12:03:27 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-06-28 12:03:27 +0300 |
commit | f7f7fec7ef3ce736e2e59d04f39f65436eefecf4 (patch) | |
tree | b93935ec9921b5cf9745442611ac7f95813765bb /ext/soap | |
parent | b98cd0719a51904c1d3813cb7926494ea7623a92 (diff) | |
parent | 143f4e3b5c4d72ae105adb14bde0ecdf361fbbf0 (diff) | |
download | php-git-f7f7fec7ef3ce736e2e59d04f39f65436eefecf4.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Reduce overhead
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 41a7866936..3f1e7186a4 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2099,7 +2099,7 @@ static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *acto } /* }}} */ -static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) /* {{{ */ +static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) /* {{{ */ { zend_bool _old_in_compilation; zend_execute_data *_old_current_execute_data; @@ -2111,11 +2111,6 @@ static void soap_error_handler(int error_num, const char *error_filename, const _old_http_response_code = SG(sapi_headers).http_response_code; _old_http_status_line = SG(sapi_headers).http_status_line; - if (!PG(modules_activated) || !SOAP_GLOBAL(use_soap_error_handler) || !EG(objects_store).object_buckets) { - call_old_error_handler(error_num, error_filename, error_lineno, format, args); - return; - } - if (Z_OBJ(SOAP_GLOBAL(error_object)) && instanceof_function(Z_OBJCE(SOAP_GLOBAL(error_object)), soap_class_entry)) { zval *tmp; @@ -2236,6 +2231,16 @@ static void soap_error_handler(int error_num, const char *error_filename, const } /* }}} */ +static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) /* {{{ */ +{ + if (EXPECTED(!SOAP_GLOBAL(use_soap_error_handler))) { + call_old_error_handler(error_num, error_filename, error_lineno, format, args); + } else { + soap_real_error_handler(error_num, error_filename, error_lineno, format, args); + } +} +/* }}} */ + /* {{{ proto use_soap_error_handler([bool $handler = TRUE]) */ PHP_FUNCTION(use_soap_error_handler) { |