1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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.

close GH-20556
This commit is contained in:
David Carlier
2025-11-22 06:03:41 +00:00
parent f88d247ce2
commit 9149c35514

View File

@@ -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);