From 4417fd194148f8afd328a22700a9b454e0cd249b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 6 Nov 2026 09:15:42 +0100 Subject: [PATCH] fix: build with non-ZTS PHP Fixes https://github.com/php/frankenphp/issues/2818 --- frankenphp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frankenphp.c b/frankenphp.c index c79bcf580a..ca7ec27b14 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -1404,6 +1404,7 @@ static int frankenphp_startup(sapi_module_struct *sapi_module) { static int frankenphp_deactivate(void) { return SUCCESS; } +#ifdef ZTS /* ext/date's post-deactivate hook frees last_errors, which its GINIT leaves * uninitialized, even when a failed startup skipped its RINIT * TODO: remove when only PHP versions with the fix are supported (8.4.28+, @@ -1414,6 +1415,7 @@ static void frankenphp_init_date_globals(void) { zend_date_globals *globals = ts_resource(*date->globals_id_ptr); globals->last_errors = NULL; } +#endif static void frankenphp_handle_aborted_connection(void) { /* a bailout would fail php_request_startup(), let the script's first write