Commit ec29a6bd768 for php.net
commit ec29a6bd768fc43a60d9f15a145140df059602c8
Author: Gina Peter Banyard <girgias@php.net>
Date: Mon Jul 27 19:42:14 2026 +0100
sapi: use bool type for post_read global
diff --git a/main/SAPI.c b/main/SAPI.c
index 523759ea79b..0ed241569db 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -217,7 +217,7 @@ SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen)
}
if (read_bytes < buflen) {
/* done */
- SG(post_read) = 1;
+ SG(post_read) = true;
}
return read_bytes;
@@ -418,7 +418,7 @@ SAPI_API void sapi_activate(void)
SG(request_info).post_entry = NULL;
SG(request_info).proto_num = 1000; /* Default to HTTP 1.0 */
SG(global_request_time) = 0;
- SG(post_read) = 0;
+ SG(post_read) = false;
SG(send_header_fcc) = empty_fcall_info_cache;
/* It's possible to override this general case in the activate() callback, if necessary. */
if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) {
diff --git a/main/SAPI.h b/main/SAPI.h
index d34c12f1bbc..1e9a8186638 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -132,7 +132,7 @@ typedef struct _sapi_globals_struct {
sapi_request_info request_info;
sapi_headers_struct sapi_headers;
int64_t read_post_bytes;
- unsigned char post_read;
+ bool post_read;
unsigned char headers_sent;
zend_stat_t global_stat;
char *default_mimetype;