Skip to content

Commit f4af8f3

Browse files
committed
Fix libxml test compatibility in xsl
1 parent 477c2af commit f4af8f3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ext/xsl/tests/registerPHPFunctionNS.phpt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ echo "--- Legit cases: none ---\n";
4949

5050
$proc = createProcessor(["foo:var_dump(string(@href))"]);
5151
try {
52-
$proc->transformToXml($inputdom);
52+
// Note: since libxml2 commit aca16fb3d45e0b2c45364ffc1cea8eb4abaca87d this only outputs 1 warning. This seems intentional.
53+
// Easiest workaround is silencing the warnings
54+
@$proc->transformToXml($inputdom);
5355
} catch (Error $e) {
5456
echo $e->getMessage(), "\n";
5557
}
@@ -90,14 +92,6 @@ var_dump($proc->transformToXml($inputdom));
9092
?>
9193
--EXPECTF--
9294
--- Legit cases: none ---
93-
94-
Warning: XSLTProcessor::transformToXml(): xmlXPathCompOpEval: function var_dump not found in %s on line %d
95-
96-
Warning: XSLTProcessor::transformToXml(): Unregistered function in %s on line %d
97-
98-
Warning: XSLTProcessor::transformToXml(): runtime error: file %s line 6 element value-of in %s on line %d
99-
100-
Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d
10195
--- Legit cases: global function callable ---
10296
string(15) "https://php.net"
10397
--- Legit cases: global string callable ---

0 commit comments

Comments
 (0)