mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/tidy: anticipate tidyOptIsReadOnly retirement.
using tidyOptGetCategory when possible. related GH-18751 close GH-18763
This commit is contained in:
1
NEWS
1
NEWS
@@ -44,6 +44,7 @@ PHP NEWS
|
||||
|
||||
- Tidy:
|
||||
. Fix memory leak in tidy output handler on error. (nielsdos)
|
||||
. Fix tidyOptIsReadonly deprecation, using tidyOptGetCategory. (David Carlier)
|
||||
|
||||
05 Jun 2025, PHP 8.3.22
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ if test "$PHP_TIDY" != "no"; then
|
||||
AC_DEFINE(HAVE_TIDYRELEASEDATE,1,[ ])
|
||||
], [], [])
|
||||
|
||||
PHP_CHECK_LIBRARY($TIDY_LIB_NAME,tidyOptGetCategory,
|
||||
[
|
||||
AC_DEFINE(HAVE_TIDYOPTGETCATEGORY,1,[ ])
|
||||
], [], [])
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($TIDY_LIB_NAME, $TIDY_LIBDIR, TIDY_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($TIDY_INCDIR)
|
||||
|
||||
|
||||
@@ -232,7 +232,11 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user