mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix argument type of simplexml_import_dom (#13170)
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.
This commit is contained in:
parent
8cc472d5d0
commit
4bd63568fb
7 changed files with 12 additions and 7 deletions
|
@ -147,7 +147,7 @@ PHP_METHOD(XSLTProcessor, importStylesheet)
|
|||
doc = nodep->doc;
|
||||
}
|
||||
if (doc == NULL) {
|
||||
zend_argument_value_error(1, "must be a valid XML node");
|
||||
zend_argument_type_error(1, "must be a valid XML node");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
|
|||
}
|
||||
|
||||
if (doc == NULL) {
|
||||
zend_argument_value_error(1, "must be a valid XML node");
|
||||
zend_argument_type_error(1, "must be a valid XML node");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue