diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index f4db619363a..b27985609cd 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -931,11 +931,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();