xref: /PHP-5.6/ext/xsl/tests/bug26384.phpt (revision 1504c700)
1--TEST--
2Bug #26384 (domxslt->process causes segfault with xsl:key)
3--SKIPIF--
4<?php require_once dirname(__FILE__) .'/skipif.inc'; ?>
5--FILE--
6<?php
7$dom = new domDocument;
8$dom->load(dirname(__FILE__)."/area_name.xml");
9if(!$dom) {
10  echo "Error while parsing the document\n";
11  exit;
12}
13$xsl = new domDocument;
14$xsl->load(dirname(__FILE__)."/area_list.xsl");
15if(!$xsl) {
16  echo "Error while parsing the document\n";
17  exit;
18}
19$proc = new xsltprocessor;
20if(!$proc) {
21  echo "Error while making xsltprocessor object\n";
22  exit;
23}
24
25$proc->importStylesheet($xsl);
26print $proc->transformToXml($dom);
27
28//this segfaulted before
29print $dom->documentElement->firstChild->nextSibling->nodeName;
30
31--EXPECT--
32HERE
33ROW
34