xref: /PHP-8.3/ext/xsl/tests/bug26384.phpt (revision 8567bc10)
1--TEST--
2Bug #26384 (domxslt->process causes segfault with xsl:key)
3--EXTENSIONS--
4xsl
5--FILE--
6<?php
7$dom = new domDocument;
8$dom->load(__DIR__."/area_name.xml");
9if(!$dom) {
10  echo "Error while parsing the document\n";
11  exit;
12}
13$xsl = new domDocument;
14$xsl->load(__DIR__."/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