summaryrefslogtreecommitdiffstats
path: root/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch')
-rw-r--r--0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
new file mode 100644
index 0000000..2842ab5
--- /dev/null
+++ b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
@@ -0,0 +1,34 @@
+From 5bb707e3afa9520a5dab46567724a9fb495f63c5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Thu, 17 Jul 2025 15:37:07 +0200
+Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default()
+
+---
+ php_stomp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/php_stomp.c b/php_stomp.c
+index 8a9a109..df04507 100644
+--- a/php_stomp.c
++++ b/php_stomp.c
+@@ -389,7 +389,7 @@ PHP_MINIT_FUNCTION(stomp)
+
+ /* Register StompException class */
+ INIT_CLASS_ENTRY(ce, PHP_STOMP_EXCEPTION_CLASSNAME, stomp_exception_methods);
+- stomp_ce_exception = zend_register_internal_class_ex(&ce, zend_exception_get_default());
++ stomp_ce_exception = zend_register_internal_class_ex(&ce, zend_ce_exception);
+
+ /* Properties */
+ zend_declare_property_null(stomp_ce_exception, "details", sizeof("details")-1, ZEND_ACC_PRIVATE );
+@@ -1004,7 +1004,7 @@ PHP_FUNCTION(stomp_read_frame)
+ fcc.object = Z_OBJ_P(return_value);
+
+ if (zend_call_function(&fci, &fcc ) == FAILURE) {
+- zend_throw_exception_ex(zend_exception_get_default(), 0 , "Could not execute %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name));
++ zend_throw_exception_ex(zend_ce_exception, 0 , "Could not execute %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name));
+ } else {
+ zval_ptr_dtor(&retval);
+ }
+--
+2.50.1
+