diff options
author | Remi Collet <remi@remirepo.net> | 2025-07-17 14:54:42 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-07-17 14:54:42 +0200 |
commit | 49fae1d3624480f6ee67e6ce9e53c2f1261d8d4f (patch) | |
tree | 2bf3107268a5fd1a452109edc0e49ca098a38d77 /57.patch | |
parent | 1f3a2b9c83239ec7a06a3c9e004ecad2c7c84a9b (diff) |
https://github.com/php-gnupg/php-gnupg/pull/57
Diffstat (limited to '57.patch')
-rw-r--r-- | 57.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/57.patch b/57.patch new file mode 100644 index 0000000..7f033ae --- /dev/null +++ b/57.patch @@ -0,0 +1,46 @@ +From 3f159064025dbde3aa0a4004cc4777a8032092b0 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 17 Jul 2025 14:50:00 +0200 +Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default() + for 8.5 + +--- + gnupg.c | 4 ++-- + gnupg_keylistiterator.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gnupg.c b/gnupg.c +index 2693539..475d16e 100644 +--- a/gnupg.c ++++ b/gnupg.c +@@ -64,7 +64,7 @@ PHPC_OBJ_DEFINE_HANDLER_VAR(gnupg); + break; \ + case 2: \ + zend_throw_exception(\ +- zend_exception_get_default(TSRMLS_C), \ ++ zend_ce_exception, \ + (char*) error, \ + 0 TSRMLS_CC \ + ); \ +@@ -169,7 +169,7 @@ static void php_gnupg_this_make(PHPC_THIS_DECLARE(gnupg), zval *options TSRMLS_D + if (gpgme_ctx_set_engine_info( + ctx, GPGME_PROTOCOL_OpenPGP, file_name, home_dir) != GPG_ERR_NO_ERROR) { + zend_throw_exception( +- zend_exception_get_default(TSRMLS_C), ++ zend_ce_exception, + (char*) "Setting engine info failed", + 0 TSRMLS_CC + ); +diff --git a/gnupg_keylistiterator.c b/gnupg_keylistiterator.c +index 9b285ee..020e941 100644 +--- a/gnupg_keylistiterator.c ++++ b/gnupg_keylistiterator.c +@@ -201,7 +201,7 @@ PHP_METHOD(gnupg_keylistiterator, rewind) + + if ((PHPC_THIS->err = gpgme_op_keylist_start( + PHPC_THIS->ctx, PHPC_THIS->pattern ? PHPC_THIS->pattern : "", 0)) != GPG_ERR_NO_ERROR){ +- zend_throw_exception(zend_exception_get_default(TSRMLS_C), (char *)gpg_strerror(PHPC_THIS->err), 1 TSRMLS_CC); ++ zend_throw_exception(zend_ce_exception, (char *)gpg_strerror(PHPC_THIS->err), 1 TSRMLS_CC); + } + if ((PHPC_THIS->err = gpgme_op_keylist_next(PHPC_THIS->ctx, &PHPC_THIS->gpgkey)) != GPG_ERR_NO_ERROR){ + RETURN_FALSE; |