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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
diff -up ./src/couchbase/bucket/view.c.old ./src/couchbase/bucket/view.c
--- ./src/couchbase/bucket/view.c.old 2023-11-27 14:01:10.682139168 +0100
+++ ./src/couchbase/bucket/view.c 2023-11-27 13:52:36.053067179 +0100
@@ -601,7 +601,11 @@ PHP_METHOD(Bucket, viewQuery)
}
prop = pcbc_read_property(pcbc_view_options_ce, options, ("query"), 0, &ret);
if (Z_TYPE_P(prop) == IS_ARRAY) {
+#if PHP_VERSION_ID < 80300
php_url_encode_hash_ex(HASH_OF(prop), &query_str, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, PHP_QUERY_RFC1738);
+#else
+ php_url_encode_hash_ex(HASH_OF(prop), &query_str, NULL, 0, NULL, NULL, NULL, PHP_QUERY_RFC1738);
+#endif
if (!PCBC_SMARTSTR_EMPTY(query_str)) {
lcb_cmdview_option_string(cmd, ZSTR_VAL(query_str.s), ZSTR_LEN(query_str.s));
}
diff -up ./src/couchbase/managers/analytics_index_manager.c.old ./src/couchbase/managers/analytics_index_manager.c
--- ./src/couchbase/managers/analytics_index_manager.c.old 2023-11-27 14:03:11.653623417 +0100
+++ ./src/couchbase/managers/analytics_index_manager.c 2023-11-27 13:54:52.379117682 +0100
@@ -1179,7 +1179,11 @@ PHP_METHOD(AnalyticsIndexManager, dropLi
add_assoc_str(&payload, "dataverse", dataverse_name);
add_assoc_str(&payload, "name", link_name);
+#if PHP_VERSION_ID < 80300
php_url_encode_hash_ex(HASH_OF(&payload), &body, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, PHP_QUERY_RFC1738);
+#else
+ php_url_encode_hash_ex(HASH_OF(&payload), &body, NULL, 0, NULL, NULL, NULL, PHP_QUERY_RFC1738);
+#endif
zval_ptr_dtor(&payload);
smart_str_0(&body);
@@ -1369,7 +1373,11 @@ PHP_METHOD(AnalyticsIndexManager, getLin
}
smart_str buf = {0};
+#if PHP_VERSION_ID < 80300
php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, PHP_QUERY_RFC1738);
+#else
+ php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, NULL, NULL, PHP_QUERY_RFC1738);
+#endif
zval_ptr_dtor(&payload);
smart_str_0(&buf);
diff -up ./src/couchbase/managers/bucket_manager.c.old ./src/couchbase/managers/bucket_manager.c
--- ./src/couchbase/managers/bucket_manager.c.old 2023-11-27 14:03:03.765331092 +0100
+++ ./src/couchbase/managers/bucket_manager.c 2023-11-27 13:53:41.920507385 +0100
@@ -240,7 +240,11 @@ PHP_METHOD(BucketManager, createBucket)
prop = pcbc_read_property(pcbc_bucket_settings_ce, settings, ("replica_indexes"), 0, &ret);
add_assoc_bool(&payload, "replicaIndex", Z_TYPE_P(prop) == IS_TRUE);
+#if PHP_VERSION_ID < 80300
php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, PHP_QUERY_RFC1738);
+#else
+ php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, NULL, NULL, PHP_QUERY_RFC1738);
+#endif
zval_ptr_dtor(&payload);
if (rv == FAILURE) {
smart_str_free(&buf);
diff -up ./src/couchbase/managers/user_manager.c.old ./src/couchbase/managers/user_manager.c
--- ./src/couchbase/managers/user_manager.c.old 2023-11-27 14:03:18.789887875 +0100
+++ ./src/couchbase/managers/user_manager.c 2023-11-27 13:55:26.962398896 +0100
@@ -342,7 +342,11 @@ PHP_METHOD(UserManager, upsertUser)
add_assoc_stringl(&payload, "roles", ZSTR_VAL(buf.s), ZSTR_LEN(buf.s));
smart_str_free(&buf);
}
+#if PHP_VERSION_ID < 80300
php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, PHP_QUERY_RFC1738);
+#else
+ php_url_encode_hash_ex(HASH_OF(&payload), &buf, NULL, 0, NULL, NULL, NULL, PHP_QUERY_RFC1738);
+#endif
zval_dtor(&payload);
if (rv == FAILURE) {
smart_str_free(&buf);
|