Merge branch 'PHP-8.3' into PHP-8.4

This commit is contained in:
David Carlier 2025-06-04 20:35:17 +01:00
commit ecc9393b36
No known key found for this signature in database
GPG key ID: 8486F847B4B94EF1
3 changed files with 11 additions and 0 deletions

1
NEWS
View file

@ -60,6 +60,7 @@ PHP NEWS
- Tidy:
. Fix memory leak in tidy output handler on error. (nielsdos)
. Fix tidyOptIsReadonly deprecation, using tidyOptGetCategory. (David Carlier)
06 Jun 2025, PHP 8.4.8

View file

@ -57,6 +57,12 @@ if test "$PHP_TIDY" != "no"; then
[],
[-L$TIDY_LIBDIR])
PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyOptGetCategory],
[AC_DEFINE([HAVE_TIDYOPTGETCATEGORY], [1],
[Define to 1 if Tidy library has the 'tidyOptGetCategory' function.])],
[],
[-L$TIDY_LIBDIR])
PHP_ADD_LIBRARY_WITH_PATH([$TIDY_LIB_NAME],
[$TIDY_LIBDIR],
[TIDY_SHARED_LIBADD])

View file

@ -234,7 +234,11 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, const char *optname, zval *value)
return FAILURE;
}
#if defined(HAVE_TIDYOPTGETCATEGORY)
if (tidyOptGetCategory(opt) == TidyInternalCategory) {
#else
if (tidyOptIsReadOnly(opt)) {
#endif
php_error_docref(NULL, E_WARNING, "Attempting to set read-only option \"%s\"", optname);
return FAILURE;
}