Commit 899b3510fcb for php
commit 899b3510fcb2fc6fae5b2bc7005645552e9a9515
Author: Alexander Danilov <adapik@yandex.ru>
Date: Thu Nov 19 09:06:33 2026 +0200
Windows CI: Fix implicit pointer-to-bool conversions (#25577)
Compare pointers explicitly with NULL in the lazy-object store, user stream
casting, and the CLI server. This preserves the existing conditions and
avoids C4047 warnings from MSVC 14.52 on the updated Windows CI image.
Closes #25577
diff --git a/Zend/zend_lazy_objects.c b/Zend/zend_lazy_objects.c
index eb8b5f300ee..63a91dd4b3c 100644
--- a/Zend/zend_lazy_objects.c
+++ b/Zend/zend_lazy_objects.c
@@ -114,7 +114,7 @@ static zend_lazy_object_info* zend_lazy_object_get_info(zend_object *obj)
static bool zend_lazy_object_has_stale_info(zend_object *obj)
{
- return zend_hash_index_find_ptr(&EG(lazy_objects_store).infos, obj->handle);
+ return zend_hash_index_find_ptr(&EG(lazy_objects_store).infos, obj->handle) != NULL;
}
zval* zend_lazy_object_get_initializer_zv(zend_object *obj)
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index e21f9f062cf..4b00e86fd95 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -1390,7 +1390,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr)
int call_result;
int ret = FAILURE;
/* If we are checking if the stream can cast, no return pointer is provided, so do not emit errors */
- bool report_errors = retptr;
+ bool report_errors = retptr != NULL;
ZVAL_STRINGL(&func_name, USERSTREAM_CAST, sizeof(USERSTREAM_CAST)-1);
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 94275e1abc0..9ce77eb0f7a 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -2914,7 +2914,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */
{
r = 0;
- bool ipv6 = strchr(server.host, ':');
+ bool ipv6 = strchr(server.host, ':') != NULL;
php_cli_server_logf(
PHP_CLI_SERVER_LOG_PROCESS,
"PHP %s Development Server (http://%s%s%s:%d) started",