1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 7aef32c30f37b9278ab86a0f0b64c0e740a6d06e Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 4 Sep 2023 08:36:21 +0200
Subject: [PATCH] fix php_url_encode_hash_ex call for 8.3
---
ext-src/php_swoole_private.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ext-src/php_swoole_private.h b/ext-src/php_swoole_private.h
index 08053f6c9..7bcfaaa84 100644
--- a/ext-src/php_swoole_private.h
+++ b/ext-src/php_swoole_private.h
@@ -1041,10 +1041,14 @@ static sw_inline char *php_swoole_http_build_query(zval *zdata, size_t *length,
#if PHP_VERSION_ID < 80000
if (php_url_encode_hash_ex(
HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738) == FAILURE) {
-#else
+#elif PHP_VERSION_ID < 80300
if (HASH_OF(zdata)) {
php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738);
} else {
+#else
+ if (HASH_OF(zdata)) {
+ php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, NULL, NULL, NULL, NULL, (int) PHP_QUERY_RFC1738);
+ } else {
#endif
if (formstr->s) {
smart_str_free(formstr);
|