diff --git a/NEWS b/NEWS index 19438cf69f1..dafc3e3453c 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ PHP NEWS - EXIF: . Added support to retrieve Exif from HEIF file. (Benstone Zhang) +- FPM: + . Fixed failed debug assertion when php_admin_value setting fails. (ilutov) + - Opcache: . Fixed bug GH-19486 (Incorrect opline after deoptimization). (Arnaud) . Fixed bug GH-19601 (Wrong JIT stack setup on aarch64/clang). (Arnaud) diff --git a/sapi/fpm/fpm/fpm_php.c b/sapi/fpm/fpm/fpm_php.c index 97d35d42bfe..8deb107d0a3 100644 --- a/sapi/fpm/fpm/fpm_php.c +++ b/sapi/fpm/fpm/fpm_php.c @@ -41,6 +41,8 @@ static int fpm_php_zend_ini_alter_master(char *name, int name_length, char *new_ ini_entry->modifiable = mode; } } else { + /* The string wasn't installed and won't be shared, it's safe to drop. */ + GC_MAKE_PERSISTENT_LOCAL(duplicate); zend_string_release_ex(duplicate, 1); } diff --git a/sapi/fpm/tests/php_admin_value-failure.phpt b/sapi/fpm/tests/php_admin_value-failure.phpt new file mode 100644 index 00000000000..dcac2e29c72 --- /dev/null +++ b/sapi/fpm/tests/php_admin_value-failure.phpt @@ -0,0 +1,48 @@ +--TEST-- +RC violation on failed php_admin_value +--SKIPIF-- + +--FILE-- +setUserIni($ini); +$tester->start(); +$tester->expectLogStartNotices(); +$tester->request()->expectBody(['string(2) "14"']); +$tester->terminate(); +$tester->close(); + +?> +Done +--EXPECT-- +Done +--CLEAN-- +