summaryrefslogtreecommitdiff
path: root/ext/xsl/tests
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-09-20 09:30:50 -0700
committerXinchen Hui <laruence@gmail.com>2015-09-20 09:30:50 -0700
commit3fc5f5cdb5d22461241b38d0e8cba8ae89b2db71 (patch)
treeefe1273636b1e54d1c5ed641afa55c32afe1e745 /ext/xsl/tests
parent6a813634052710f3f4bf6e2e03ca1b6c7be3bcee (diff)
downloadphp-git-3fc5f5cdb5d22461241b38d0e8cba8ae89b2db71.tar.gz
Fixed bug #70535 (XSLT: free(): invalid pointer)
Diffstat (limited to 'ext/xsl/tests')
-rw-r--r--ext/xsl/tests/bug70535.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/xsl/tests/bug70535.phpt b/ext/xsl/tests/bug70535.phpt
new file mode 100644
index 0000000000..26b4d3ca04
--- /dev/null
+++ b/ext/xsl/tests/bug70535.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70535 (XSLT: free(): invalid pointer)
+--SKIPIF--
+<?php
+if (!extension_loaded('xsl')) die("skip Extension XSL is required\n");
+if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded";
+?>
+--FILE--
+<?php
+
+$xmlInput = simplexml_load_string('<root></root>');
+$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>';
+
+$xsl = new \DomDocument();
+$xsl->loadXML($xslInput);
+$xslt = new \XsltProcessor();
+$xslt->importStylesheet($xsl);
+$xmloutput = $xslt->transformToXml($xmlInput);
+?>
+okey
+--EXPECT--
+okey