[php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5

From: Date: Sat, 19 Sep 2026 16:01:23 +0000
Subject: [php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141283@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-09-19T16:58:03+01:00 Commit: https://github.com/php/php-src/commit/921c689868ced357d5c575be8e5351eee8fc8731 Raw diff: https://github.com/php/php-src/commit/921c689868ced357d5c575be8e5351eee8fc8731.diff Merge branch 'PHP-8.4' into PHP-8.5 Changed paths: M NEWS M sapi/cli/php_cli.c Diff: diff --git a/NEWS b/NEWS index 5c2531405229..98f99ad217ee 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ PHP NEWS unfolded, crashing the VM in zval_undefined_cv). (ndossche) . Fixed OSS-Fuzz 532353396 (assertion failure with static type). (Girgias) +- CLI + . Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during + request activation). (matyhtf) + - DOM: . Fixed use-after-free when re-constructing a DOMXPath whose php:function registrations are freed while still reachable from the cycle collector. diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 923686969a3c..a6dc09b085cf 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -356,6 +356,15 @@ static void sapi_cli_log_message(const char *message, int syslog_type_int) /* {{ } /* }}} */ +static int sapi_cli_activate(void) /* {{{ */ +{ +#if defined(PHP_WIN32) && defined(ZTS) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif + return SUCCESS; +} +/* }}} */ + static int sapi_cli_deactivate(void) /* {{{ */ { fflush(stdout); @@ -420,7 +429,7 @@ static sapi_module_struct cli_sapi_module = { php_cli_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ - NULL, /* activate */ + sapi_cli_activate, /* activate */ sapi_cli_deactivate, /* deactivate */ sapi_cli_ub_write, /* unbuffered write */

« previous php.cvs (#141283) next »