From ca001e463828b4b64869ce7829ef4e53bdc3f69c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 25 Dec 2021 15:56:07 +0100 Subject: update to 1.5.1 drop patch merged upstream --- 99.patch | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 99.patch (limited to '99.patch') diff --git a/99.patch b/99.patch deleted file mode 100644 index a0f740a..0000000 --- a/99.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cf2e24d788d9d31715c272197417cb03283acd40 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 23 Dec 2021 14:43:51 +0100 -Subject: [PATCH] call json_encode using call_user_func on PHP 7 - ---- - scout_utils.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/scout_utils.c b/scout_utils.c -index 424c782..ea975db 100644 ---- a/scout_utils.c -+++ b/scout_utils.c -@@ -89,11 +89,21 @@ void safely_copy_argument_zval_as_scalar(zval *original_to_copy, zval *destinati - if (strcasecmp("stream-context", zend_rsrc_list_get_rsrc_type(Z_RES_P(original_to_copy))) == 0) { - php_stream_context *stream_context = zend_fetch_resource_ex(original_to_copy, NULL, php_le_stream_context()); - if (stream_context != NULL) { -+#if PHP_VERSION_ID < 80000 -+ /* ext/json can be shared */ -+ zval args[1], jsonenc; -+ -+ ZVAL_STRINGL(&jsonenc, "json_encode", sizeof("json_encode")-1); -+ args[0] = stream_context->options; -+ call_user_function(EG(function_table), NULL, &jsonenc, destination, 1, args); -+#else -+ /* ext/json is always there */ - smart_str json_encode_string_buffer = {0}; - php_json_encode(&json_encode_string_buffer, &stream_context->options, 0); - smart_str_0(&json_encode_string_buffer); - ZVAL_STR_COPY(destination, json_encode_string_buffer.s); - smart_str_free(&json_encode_string_buffer); -+#endif - return; - } - } -- cgit