xref: /PHP-7.3/ext/xsl/tests/bug70535.phpt (revision 4febfc25)
1--TEST--
2Bug #70535 (XSLT: free(): invalid pointer)
3--SKIPIF--
4<?php
5if (!extension_loaded('xsl')) die("skip Extension XSL is required");
6if (!extension_loaded("simplexml")) die("skip simplexml extension is not loaded");
7?>
8--FILE--
9<?php
10
11$xmlInput = simplexml_load_string('<root></root>');
12$xslInput = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="root"><xsl:text>success</xsl:text></xsl:template></xsl:stylesheet>';
13
14$xsl = new \DomDocument();
15$xsl->loadXML($xslInput);
16$xslt = new \XsltProcessor();
17$xslt->importStylesheet($xsl);
18$xmloutput = $xslt->transformToXml($xmlInput);
19?>
20okey
21--EXPECT--
22okey
23