Skip to content

Commit aad2266

Browse files
committed
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5: Fix GH-24697: cli: passing PHP_HTTP_PARSER_STRICT build option doesn't work
2 parents ca0030b + 61156b6 commit aad2266

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ PHP NEWS
88
. Fixed unmapping of an unrelated range when the aligned chunk mmap fails
99
(Marti2203).
1010

11+
- CLI:
12+
. Fixed bug GH-24697 (PHP_HTTP_PARSER_STRICT build option doesn't work).
13+
(ndossche, devnexen)
14+
1115
- DBA:
1216
. Fixed bug GH-24641 (ndbm backend never checks dbm_open() return value,
1317
NULL deref on first use after a failed open). (Girgias)

‎sapi/cli/php_http_parser.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ enum flags
250250
#define start_state (parser->type == PHP_HTTP_REQUEST ? s_start_req : s_start_res)
251251

252252

253-
#ifdef HTTP_PARSER_STRICT
253+
#if HTTP_PARSER_STRICT
254254
# define STRICT_CHECK(cond) if (cond) goto error
255255
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
256256
#else

‎sapi/cli/php_http_parser.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ extern "C" {
3636

3737
#include <stdint.h>
3838

39-
/* Compile with -DPHP_HTTP_PARSER_STRICT=0 to make less checks, but run
40-
* faster
39+
/* Compile with -DPHP_HTTP_PARSER_STRICT=1 to enable more checks, but run
40+
* slower
4141
*/
4242
#ifndef PHP_HTTP_PARSER_STRICT
43-
# define PHP_HTTP_PARSER_STRICT 1
44-
#else
4543
# define PHP_HTTP_PARSER_STRICT 0
4644
#endif
4745

0 commit comments

Comments
 (0)