mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Reduce overhead
This commit is contained in:
parent
68485f8ab4
commit
143f4e3b5c
1 changed files with 11 additions and 6 deletions
|
@ -2101,7 +2101,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;
|
||||
|
@ -2113,11 +2113,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;
|
||||
|
@ -2238,6 +2233,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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue