Merge branch 'PHP-8.2'

This commit is contained in:
Derick Rethans 2023-07-31 19:57:02 +01:00
commit 86afbe10e2
16 changed files with 273 additions and 13 deletions

View file

@ -320,7 +320,7 @@ PHP_METHOD(XSLTProcessor, importStylesheet)
xmlDoc *doc = NULL, *newdoc = NULL;
xsltStylesheetPtr sheetp, oldsheetp;
xsl_object *intern;
int prevSubstValue, prevExtDtdValue, clone_docu = 0;
int clone_docu = 0;
xmlNode *nodep = NULL;
zval *cloneDocu, rv;
zend_string *member;
@ -344,13 +344,12 @@ PHP_METHOD(XSLTProcessor, importStylesheet)
stylesheet document otherwise the node proxies will be a mess */
newdoc = xmlCopyDoc(doc, 1);
xmlNodeSetBase((xmlNodePtr) newdoc, (xmlChar *)doc->URL);
prevSubstValue = xmlSubstituteEntitiesDefault(1);
prevExtDtdValue = xmlLoadExtDtdDefaultValue;
PHP_LIBXML_SANITIZE_GLOBALS(parse);
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
sheetp = xsltParseStylesheetDoc(newdoc);
xmlSubstituteEntitiesDefault(prevSubstValue);
xmlLoadExtDtdDefaultValue = prevExtDtdValue;
PHP_LIBXML_RESTORE_GLOBALS(parse);
if (!sheetp) {
xmlFreeDoc(newdoc);