[PECL-CVS] [pecl-web_services-oauth] master: use zend_ce_exception instead of zend_exception_get_default() for 8.5

[email protected] (Remi Collet via Michael Wallner)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Remi Collet (remicollet)
Committer: Michael Wallner (m6w6)
Date: 2025-08-20T09:27:16+02:00

Commit: https://github.com/php/pecl-web_services-oauth/commit/c308b501a65904f8872b73724dc5f8156730b9fa
Raw diff: https://github.com/php/pecl-web_services-oauth/commit/c308b501a65904f8872b73724dc5f8156730b9fa.diff

use zend_ce_exception instead of zend_exception_get_default() for 8.5

Changed paths:
  M  oauth.c
  M  provider.c


Diff:

diff --git a/oauth.c b/oauth.c
index a7fd6cc..a424097 100644
--- a/oauth.c
+++ b/oauth.c
@@ -179,7 +179,7 @@ static void so_object_free_storage(zend_object *obj) /* {{{ */
 void soo_handle_error(php_so_object *soo, long errorCode, char *msg, char *response, char *additional_info) /* {{{ */
 {
 	zval ex;
-	zend_class_entry *dex = zend_exception_get_default(), *soox = soo_exception_ce;
+	zend_class_entry *dex = zend_ce_exception, *soox = soo_exception_ce;
 
 	object_init_ex(&ex, soox);
 
@@ -2790,7 +2790,7 @@ PHP_MINIT_FUNCTION(oauth)
 
 	INIT_CLASS_ENTRY(soo_ex_ce, "OAuthException", NULL);
 
-	soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_exception_get_default());
+	soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_ce_exception);
 #if PHP_VERSION_ID >= 80200
 	soo_exception_ce->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
 	zend_string *attribute_name_AllowDynamicProperties_class_OAuthException = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1);
diff --git a/provider.c b/provider.c
index 9864202..9d54dca 100644
--- a/provider.c
+++ b/provider.c
@@ -985,7 +985,7 @@ SOP_METHOD(reportProblem)
 	sapi_header_line ctr = {0};
 	zend_bool send_headers = 1;
 
-	ex_ce = zend_exception_get_default();
+	ex_ce = zend_ce_exception;
 
 	if(zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &exception, ex_ce, &send_headers)==FAILURE) {
 		return;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.