Merge branch 'PHP-8.1' into PHP-8.2

This commit is contained in:
Derick Rethans 2023-07-31 19:54:44 +01:00
commit deddf4692a
16 changed files with 274 additions and 12 deletions

View file

@ -308,7 +308,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;
@ -332,13 +332,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);