Skip to content

Implement iteration cache, item cache and length cache for node list iteration #11330

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

Merged
merged 18 commits into from
Jun 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add NULL check for detached document case
  • Loading branch information
nielsdos committed Jun 1, 2023
commit 85da7e9c99884176bfd49e92eff6187b94b9137c
5 changes: 5 additions & 0 deletions ext/dom/php_dom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,11 @@ bool dom_has_feature(zend_string *feature, zend_string *version)

xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr basep, xmlNodePtr nodep, char *ns, char *local, int *cur, int index) /* {{{ */
{
/* Can happen with detached document */
if (UNEXPECTED(nodep == NULL)) {
return NULL;
}

xmlNodePtr ret = NULL;
bool local_match_any = local[0] == '*' && local[1] == '\0';

Expand Down