mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

It needs to be "object". This is because first- and third-party extension can register custom node types using `php_libxml_register_export`. So we don't know upfront what types can be expected. This also changes the error to a TypeError everywhere.
18 lines
377 B
PHP
18 lines
377 B
PHP
--TEST--
|
|
XSLTProcessor::importStylesheet() - Test with invalid stylesheet
|
|
--EXTENSIONS--
|
|
xsl
|
|
--FILE--
|
|
<?php
|
|
|
|
$xslt = new XSLTProcessor();
|
|
$dummy = new stdClass();
|
|
try {
|
|
var_dump($xslt->importStylesheet($dummy));
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
XSLTProcessor::importStylesheet(): Argument #1 ($stylesheet) must be a valid XML node
|