a possible crash and enforce safe_mode & open_basedir restrictions.
Revert workaround for bug #26384, which is due to a bug in libxslt.
Christian will commit a better workaround shortly.
xmlDoc *doc = (xmlDoc *) rsrc->ptr;
if (doc) {
+ node_list_wrapper_dtor(doc->children, 1 TSRMLS_CC);
node_wrapper_dtor((xmlNodePtr) doc);
xmlFreeDoc(doc);
}
int ret, clone = 0;
char *filename;
int filename_len = 0;
+ FILE *f;
DOMXML_GET_THIS(idxsl);
RETURN_FALSE;
}
+ if (filename_len && !(f = php_stream_open_wrapper_as_file(filename, "w", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL))) {
+ RETURN_FALSE;
+ }
+
DOMXML_GET_OBJ(xmldocp, idxml, le_domxmldocp);
if (idparams) {
}
if (filename_len) {
- FILE *f;
- f = fopen (filename,"w");
docp = xsltProfileStylesheet(xsltstp, xmldocp, (const char**)params, f);
fclose(f);
} else {