Merge branch 'PHP-8.0' into PHP-8.1

This commit is contained in:
Derick Rethans 2023-07-31 19:53:43 +01:00
commit 0870ebb862
16 changed files with 268 additions and 12 deletions

View file

@ -315,7 +315,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;
@ -339,13 +339,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);