Skip to content

Commit 5a2084b

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Fix not thread safe RelaxNG invocations in ZTS builds Fix not thread safe xmlSchemaParse calls in ZTS builds
2 parents f60134a + 595b746 commit 5a2084b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/libxml/libxml.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#ifdef LIBXML_SCHEMAS_ENABLED
4141
#include <libxml/relaxng.h>
4242
#include <libxml/xmlschemas.h>
43+
#include <libxml/xmlschemastypes.h>
4344
#endif
4445

4546
#include "php_libxml.h"
@@ -928,7 +929,14 @@ PHP_LIBXML_API void php_libxml_initialize(void)
928929
if (!php_libxml_initialized) {
929930
/* we should be the only one's to ever init!! */
930931
ZEND_IGNORE_LEAKS_BEGIN();
932+
931933
xmlInitParser();
934+
#ifdef LIBXML_SCHEMAS_ENABLED
935+
xmlSchemaInitTypes();
936+
#endif
937+
#ifdef LIBXML_RELAXNG_ENABLED
938+
xmlRelaxNGInitTypes();
939+
#endif
932940
ZEND_IGNORE_LEAKS_END();
933941

934942
php_libxml_default_entity_loader = xmlGetExternalEntityLoader();

0 commit comments

Comments
 (0)