diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 33c2a6f2aed..ece46c438bf 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -932,11 +932,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();