diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-05-17 11:15:32 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-05-17 11:52:41 -0500 |
commit | 26b35cab46d20937724fe97682d630603ef799d3 (patch) | |
tree | 981b12434b210d5af67ecc18a29e2892fbf302c9 | |
parent | 434a46612e05c079da1116960cf2a2d28f4d8256 (diff) | |
download | php-git-26b35cab46d20937724fe97682d630603ef799d3.tar.gz |
Make zend_get_exception_base static.
Soap extension can use other API functions.
-rw-r--r-- | Zend/zend_exceptions.c | 8 | ||||
-rw-r--r-- | Zend/zend_exceptions.h | 2 | ||||
-rw-r--r-- | ext/soap/soap.c | 4 |
3 files changed, 4 insertions, 10 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 96e426130e..b44bb95661 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -38,13 +38,9 @@ static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object) +static zend_class_entry *zend_get_exception_base(zval *object) { - if (instanceof_function(Z_OBJCE_P(object), error_ce)) { - return error_ce; - } - - return default_exception_ce; + return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; } void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index bae4c35a78..6f7ceed78e 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -34,8 +34,6 @@ ZEND_API void zend_throw_exception_internal(zval *exception); void zend_register_default_exception(void); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object); - ZEND_API zend_class_entry *zend_exception_get_default(void); ZEND_API zend_class_entry *zend_get_error_exception(void); ZEND_API zend_class_entry *zend_get_error(void); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index e6c7e5f4cd..05c7b857f3 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1499,7 +1499,7 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_error())) { if (service->send_errors) { zval rv; - zend_string *msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + zend_string *msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); add_soap_fault_ex(&exception_object, this_ptr, "Server", msg->val, NULL, NULL); zend_string_release(msg); } else { @@ -2602,7 +2602,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act zval exception_object; ZVAL_OBJ(&exception_object, EG(exception)); - msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); /* change class */ EG(exception)->ce = soap_fault_class_entry; set_soap_fault(&exception_object, NULL, "Client", msg->val, NULL, NULL, NULL); |