From 63ae3d5e96d916679dd1e2fe1fe6ff4a8d4bf1c5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 22 Nov 2025 06:03:41 +0000 Subject: [PATCH] Fix GH-20554: php_cli_server() get http status as string build issue. due to the signature of this helper it needs to be const also bsearch key argument needs to be too. --- sapi/cli/php_cli_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 8d67fb2864c6d..df01d3df91137 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -304,7 +304,7 @@ static int status_comp(const void *a, const void *b) /* {{{ */ static const char *get_status_string(int code) /* {{{ */ { - http_response_status_code_pair needle = {code, NULL}, + const http_response_status_code_pair needle = {code, NULL}, *result = NULL; result = bsearch(&needle, http_status_map, http_status_map_len, sizeof(needle), status_comp);