From 680bc45ba5c31988e4a6be2a9f4d779baea8c37e Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 10 May 2009 15:13:05 +0000 Subject: - MFH: Fixed bug #48221 (memory leak when passing invalid xslt parameter) --- ext/xsl/tests/bug48221.phpt | 85 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 ext/xsl/tests/bug48221.phpt (limited to 'ext/xsl/tests') diff --git a/ext/xsl/tests/bug48221.phpt b/ext/xsl/tests/bug48221.phpt new file mode 100644 index 0000000000..609112db3d --- /dev/null +++ b/ext/xsl/tests/bug48221.phpt @@ -0,0 +1,85 @@ +--TEST-- +Bug #48221 (memory leak when passing invalid xslt parameter) +--SKIPIF-- + +--FILE-- +loadXML(' + + Sales Results By Division + + + + + + + + + + + + + + + + + + + +
DivisionRevenueGrowthBonus
+ + + + + + + + color:red + + + + + +
+ +'); + +$dom = new DOMDocument; +$dom->loadXMl(' + + + 10 + 9 + 7 + + + + 4 + 3 + 4 + + + + 6 + -1.5 + 2 + + +'); + +$proc = new xsltprocessor; +$proc->importStylesheet($xsl); +$proc->setParameter('', '', '"\''); +$proc->transformToXml($dom); + +?> +--EXPECTF-- +Warning: XSLTProcessor::transformToXml(): Cannot create XPath expression (string contains both quote and double-quotes) in %s on line %d -- cgit v1.2.1