diff options
author | Remi Collet <remi@remirepo.net> | 2025-07-18 07:27:37 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-07-18 07:27:37 +0200 |
commit | d36d0cd5a764c670d36c24799f51747a716e9ccb (patch) | |
tree | 7edd455b1a09d7f5a5b67e55eab9c6aee1b96357 /0001-return-string-in-output-handler.patch | |
parent | ca734bce7fb2c46bcfb256ec0cc99a60f22612bf (diff) |
https://github.com/m6w6/ext-http/pull/149
Diffstat (limited to '0001-return-string-in-output-handler.patch')
-rw-r--r-- | 0001-return-string-in-output-handler.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/0001-return-string-in-output-handler.patch b/0001-return-string-in-output-handler.patch new file mode 100644 index 0000000..717e603 --- /dev/null +++ b/0001-return-string-in-output-handler.patch @@ -0,0 +1,31 @@ +From 36201dbbe628f2bc40cb1ed6c22f4486f3468b27 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 18 Jul 2025 07:19:36 +0200 +Subject: [PATCH] return string in output handler + +Returning a non-string result from user output handler is deprecated + +From https://wiki.php.net/rfc/deprecations_php_8_4 + + A return value of true is treated like a context reset, + which is identical to returning an empty string. +--- + src/php_http_env_response.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/php_http_env_response.c b/src/php_http_env_response.c +index 3dba5b9..b44c58d 100644 +--- a/src/php_http_env_response.c ++++ b/src/php_http_env_response.c +@@ -1165,7 +1165,7 @@ static PHP_METHOD(HttpEnvResponse, __invoke) + } else { + php_http_message_body_append(obj->message->body, ob_str, ob_len); + } +- RETURN_TRUE; ++ RETURN_EMPTY_STRING(); + } + } + +-- +2.50.1 + |