Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages for XSLTProcessor::transformToDoc() #12332

Merged
merged 2 commits into from Oct 2, 2023

Conversation

nielsdos
Copy link
Member

Also adds a relevant test file, as both these branches were untested before.

Also adds a relevant test file, as both these branches were untested before.
Comment on lines 576 to 581
ce = zend_lookup_class(ret_class);
if (ce == NULL || !instanceof_function(ce, curce)) {
xmlFreeDoc(newdocp);
if (ce == NULL) {
zend_argument_type_error(2, "must be a valid class");
goto fail;
}
if (!instanceof_function(ce, curce)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't the C ZPP type specifier be used instead for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, thanks. I've updated this to use C.

@nielsdos nielsdos merged commit f88368c into php:master Oct 2, 2023
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants