1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add a test for previously-uncovered error condition in C14N (#14283)

This commit is contained in:
Niels Dossche
2024-05-20 23:55:01 +02:00
committed by GitHub
parent dbbd01235d
commit 14b92d5181

View File

@@ -0,0 +1,16 @@
--TEST--
Not returning a node set for C14N
--EXTENSIONS--
dom
--FILE--
<?php
$dom = new DOMDocument;
$dom->loadXML('<root>test</root>');
try {
$dom->documentElement->C14N(true, false, ['query' => 'string(./root/text())']);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
XPath query did not return a nodeset