File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,17 @@ $doc->documentElement->appendChild($comment);
1616unset($ doc );
1717$ proc = new XSLTProcessor ();
1818var_dump ($ proc ->importStylesheet ($ comment ));
19+ $ sxe = simplexml_load_string ('<container/> ' );
20+ $ proc = new XSLTProcessor ();
21+ $ proc ->importStylesheet ($ sxe );
1922?>
2023--EXPECTF--
2124Warning: XSLTProcessor::importStylesheet(): compilation error: file %s line 1 element container in %s on line %d
2225
2326Warning: XSLTProcessor::importStylesheet(): xsltParseStylesheetProcess : document is not a stylesheet in %s on line %d
2427bool(false)
28+
29+ Warning: XSLTProcessor::importStylesheet(): compilation error: element container in %s on line %d
30+
31+ Warning: XSLTProcessor::importStylesheet(): xsltParseStylesheetProcess : document is not a stylesheet in %s on line %d
32+
Original file line number Diff line number Diff line change @@ -196,7 +196,11 @@ PHP_METHOD(XSLTProcessor, importStylesheet)
196196 RETURN_THROWS ();
197197 }
198198
199- php_dom_create_object ((xmlNodePtr ) nodep -> doc , & owner_zv , php_dom_obj_from_obj (Z_OBJ_P (docp )));
199+ /* See dom_import_simplexml_common */
200+
201+ dom_object * nodeobj = (dom_object * ) ((char * ) Z_OBJ_P (docp ) - Z_OBJ_HT_P (docp )-> offset );
202+
203+ php_dom_create_object ((xmlNodePtr ) nodep -> doc , & owner_zv , nodeobj );
200204 docp = & owner_zv ;
201205 }
202206
You can’t perform that action at this time.
0 commit comments