From 17f253a1f2ed832d4135f464bb282f91636cbe74 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 4 Nov 2025 15:13:43 +0100 Subject: [PATCH 1/6] PHP-8.3 is now for PHP 8.3.29-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index c3acf0ce15a4..016342ca97dd 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.28 +?? ??? ????, PHP 8.3.29 + + +20 Nov 2025, PHP 8.3.28 - Core: . Fixed bug GH-19934 (CGI with auto_globals_jit=0 causes uouv). (ilutov) diff --git a/Zend/zend.h b/Zend/zend.h index 3eade95aa6ac..9f57b50997a0 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.28-dev" +#define ZEND_VERSION "4.3.29-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 2ceb4d8df338..cb5f4e705722 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.3.28-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.29-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 00dbab93a747..d9bd5c65f21c 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 28 +#define PHP_RELEASE_VERSION 29 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.28-dev" -#define PHP_VERSION_ID 80328 +#define PHP_VERSION "8.3.29-dev" +#define PHP_VERSION_ID 80329 From 57deb6c11b3e6dbd456f6165b2469287db7e3694 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Tue, 4 Nov 2025 12:07:39 -0400 Subject: [PATCH 2/6] PHP 8.4 is now for PHP 8.4.16-dev (Looks like this wasn't bumped for 8.4.15-dev previously) --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 6960722a611b..b0a2114b4d37 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.4.15 +?? ??? ????, PHP 8.4.16 + + +20 Nov 2025, PHP 8.4.15 - Core: . Fixed bug GH-19934 (CGI with auto_globals_jit=0 causes uouv). (ilutov) diff --git a/Zend/zend.h b/Zend/zend.h index 1c6d37b7f504..845bb073a890 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.4.14-dev" +#define ZEND_VERSION "4.4.16-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 30bbdf22ff3c..d26930bc82d0 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.4.14-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.4.16-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 5c0e7705b9e1..6b456049a0fc 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 4 -#define PHP_RELEASE_VERSION 14 +#define PHP_RELEASE_VERSION 16 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.4.14-dev" -#define PHP_VERSION_ID 80414 +#define PHP_VERSION "8.4.16-dev" +#define PHP_VERSION_ID 80416 From 6a2c43551d8387b01f7d3174b5219949f9f8c3e8 Mon Sep 17 00:00:00 2001 From: Volker Dusch Date: Tue, 4 Nov 2025 18:03:00 +0100 Subject: [PATCH 3/6] [ci skip] Update NEWS for PHP 8.5.0 RC4 --- NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1ce673b2739e..07dd97d4f828 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.5.0RC4 +?? ??? ????, PHP 8.5.0 + + +06 Nov 2025, PHP 8.5.0RC4 - Core: . Fixed bug GH-20270 (Broken parent hook call with named arguments). (ilutov) From 78107c4a9a0f459783baadd9ded8abfde9493a8f Mon Sep 17 00:00:00 2001 From: Volker Dusch Date: Tue, 4 Nov 2025 19:55:56 +0100 Subject: [PATCH 4/6] PHP 8.5 is now for PHP 8.5.1-dev --- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zend/zend.h b/Zend/zend.h index b103faf5ab59..e2e500022a85 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.5.0-dev" +#define ZEND_VERSION "4.5.1-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index fa72e3bdcaff..f81d8cf60905 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.5.0-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.5.1-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 269397ba11e1..87cf375f2e0f 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 5 -#define PHP_RELEASE_VERSION 0 +#define PHP_RELEASE_VERSION 1 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.5.0-dev" -#define PHP_VERSION_ID 80500 +#define PHP_VERSION "8.5.1-dev" +#define PHP_VERSION_ID 80501 From 04323955c1f7724e54d9d70744c28860b565d9a4 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:59:38 +0100 Subject: [PATCH 5/6] pgsql: Fix memory leak when object init fails (#20387) The return value is already overwritten by this point so we do have to clean up the old return value (i.e. dataset) after all. --- ext/pgsql/pgsql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 241dc214d8eb..96a3cc7e7073 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1875,6 +1875,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ ZVAL_COPY_VALUE(&dataset, return_value); zend_result obj_initialized = object_init_ex(return_value, ce); if (UNEXPECTED(obj_initialized == FAILURE)) { + zval_ptr_dtor(&dataset); RETURN_THROWS(); } if (!ce->default_properties_count && !ce->__set) { From fcc159b4f623127b054e433d957060835f73c743 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:26:14 +0100 Subject: [PATCH 6/6] Fix GH-20374: PHP with tidy and custom-tags Both enums and integers map to TidyInteger, however, in the TidyInteger case we always used zval_get_long(). So for a non-numeric string, this would get turned into 0. 0 is the first enum value in that case, so the wrong enum value could be selected. To solve this, add special handling for strings and (stringable) objects such that we can explicitly check for numeric strings, and if they're not, handle them as normal strings instead of as 0. Closes GH-20387. --- NEWS | 2 + ext/tidy/tests/gh20374.phpt | 169 ++++++++++++++++++++++++++++++++++++ ext/tidy/tidy.c | 35 +++++++- 3 files changed, 202 insertions(+), 4 deletions(-) create mode 100644 ext/tidy/tests/gh20374.phpt diff --git a/NEWS b/NEWS index 016342ca97dd..7cf9b1dde34a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.29 +- Tidy: + . Fixed bug GH-20374 (PHP with tidy and custom-tags). (ndossche) 20 Nov 2025, PHP 8.3.28 diff --git a/ext/tidy/tests/gh20374.phpt b/ext/tidy/tests/gh20374.phpt new file mode 100644 index 000000000000..b17706f7a273 --- /dev/null +++ b/ext/tidy/tests/gh20374.phpt @@ -0,0 +1,169 @@ +--TEST-- +GH-20374 (PHP with tidy and custom-tags) +--EXTENSIONS-- +tidy +--CREDITS-- +franck-paul +--FILE-- +ret; + } +} + +class MyThrowingStringable { + public function __toString(): string { + throw new Error('no'); + } +} + +$values = [ + 'string blocklevel' => 'blocklevel', + 'int' => 1, + 'double overflow' => (string) (2.0**80.0), + 'numeric string int 1' => '1', + 'numeric string double 1.0' => '1.0', + 'false' => false, + 'true' => true, + 'NAN' => NAN, + 'INF' => INF, + 'object with numeric string int 0' => new MyStringable('0'), + 'object with string blocklevel' => new MyStringable('blocklevel'), + 'object with string empty' => new MyStringable('empty'), + 'object with exception' => new MyThrowingStringable, +]; + +foreach ($values as $key => $value) { + echo "--- $key ---\n"; + $str = 'test'; + + $config = [ + 'custom-tags' => $value, + ]; + + $tidy = new tidy(); + try { + $tidy->parseString($str, $config, 'utf8'); + echo $tidy->value, "\n"; + } catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +--- string blocklevel --- + + + + + +test + + +--- int --- + + + + + +test + + +--- double overflow --- + + + + + +test + + +--- numeric string int 1 --- + + + + + +test + + +--- numeric string double 1.0 --- + + + + + +test + + +--- false --- + + + + + +test + + +--- true --- + + + + + +test + + +--- NAN --- + + + + + +test + + +--- INF --- + + + + + +test + + +--- object with numeric string int 0 --- + + + + + +test + + +--- object with string blocklevel --- + + + + + +test + + +--- object with string empty --- + + + + + + +test + + +--- object with exception --- +Error: no diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 434d5a8493bb..2cbbcbeae65d 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -251,10 +251,37 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value) zend_tmp_string_release(tmp_str); break; - case TidyInteger: - lval = zval_get_long(value); - if (tidyOptSetInt(doc, tidyOptGetId(opt), lval)) { - return SUCCESS; + case TidyInteger: /* integer or enum */ + ZVAL_DEREF(value); + /* Enum will correspond to a non-numeric string or object */ + if (Z_TYPE_P(value) == IS_STRING || Z_TYPE_P(value) == IS_OBJECT) { + double dval; + str = zval_try_get_tmp_string(value, &tmp_str); + if (UNEXPECTED(!str)) { + return FAILURE; + } + uint8_t type = is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), &lval, &dval, true); + if (type == IS_DOUBLE) { + lval = zend_dval_to_lval_cap(dval); + type = IS_LONG; + } + if (type == IS_LONG) { + if (tidyOptSetInt(doc, tidyOptGetId(opt), lval)) { + zend_tmp_string_release(tmp_str); + return SUCCESS; + } + } else { + if (tidyOptSetValue(doc, tidyOptGetId(opt), ZSTR_VAL(str))) { + zend_tmp_string_release(tmp_str); + return SUCCESS; + } + } + zend_tmp_string_release(tmp_str); + } else { + lval = zval_get_long(value); + if (tidyOptSetInt(doc, tidyOptGetId(opt), lval)) { + return SUCCESS; + } } break;