From f3cb9a81fb77ba18043fd53514b94a442f30219e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 14 Oct 2025 22:14:54 +0200 Subject: [PATCH] Wrap the normally lazy-initialized components in ZTS --- ext/libxml/libxml.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 8f57d6fb688..d5009889549 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -936,11 +936,13 @@ PHP_LIBXML_API void php_libxml_initialize(void) ZEND_IGNORE_LEAKS_BEGIN(); xmlInitParser(); -#ifdef LIBXML_SCHEMAS_ENABLED +#ifdef ZTS +# ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaInitTypes(); -#endif -#ifdef LIBXML_RELAXNG_ENABLED +# endif +# ifdef LIBXML_RELAXNG_ENABLED xmlRelaxNGInitTypes(); +# endif #endif ZEND_IGNORE_LEAKS_END();