@@ -2101,7 +2101,7 @@ static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *acto
2101
2101
}
2102
2102
/* }}} */
2103
2103
2104
- static void soap_error_handler (int error_num , const char * error_filename , const uint32_t error_lineno , const char * format , va_list args ) /* {{{ */
2104
+ 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 ) /* {{{ */
2105
2105
{
2106
2106
zend_bool _old_in_compilation ;
2107
2107
zend_execute_data * _old_current_execute_data ;
@@ -2113,11 +2113,6 @@ static void soap_error_handler(int error_num, const char *error_filename, const
2113
2113
_old_http_response_code = SG (sapi_headers ).http_response_code ;
2114
2114
_old_http_status_line = SG (sapi_headers ).http_status_line ;
2115
2115
2116
- if (!PG (modules_activated ) || !SOAP_GLOBAL (use_soap_error_handler ) || !EG (objects_store ).object_buckets ) {
2117
- call_old_error_handler (error_num , error_filename , error_lineno , format , args );
2118
- return ;
2119
- }
2120
-
2121
2116
if (Z_OBJ (SOAP_GLOBAL (error_object )) &&
2122
2117
instanceof_function (Z_OBJCE (SOAP_GLOBAL (error_object )), soap_class_entry )) {
2123
2118
zval * tmp ;
@@ -2238,6 +2233,16 @@ static void soap_error_handler(int error_num, const char *error_filename, const
2238
2233
}
2239
2234
/* }}} */
2240
2235
2236
+ static void soap_error_handler (int error_num , const char * error_filename , const uint32_t error_lineno , const char * format , va_list args ) /* {{{ */
2237
+ {
2238
+ if (EXPECTED (!SOAP_GLOBAL (use_soap_error_handler ))) {
2239
+ call_old_error_handler (error_num , error_filename , error_lineno , format , args );
2240
+ } else {
2241
+ soap_real_error_handler (error_num , error_filename , error_lineno , format , args );
2242
+ }
2243
+ }
2244
+ /* }}} */
2245
+
2241
2246
/* {{{ proto use_soap_error_handler([bool $handler = TRUE]) */
2242
2247
PHP_FUNCTION (use_soap_error_handler )
2243
2248
{
0 commit comments