Skip to content

ext/xml: Use zend_hash_add() for missing array keys#21536

Merged
ndossche merged 4 commits intophp:masterfrom
arshidkv12:xml-2
Mar 26, 2026
Merged

ext/xml: Use zend_hash_add() for missing array keys#21536
ndossche merged 4 commits intophp:masterfrom
arshidkv12:xml-2

Conversation

@arshidkv12
Copy link
Copy Markdown
Contributor

Use zend_hash_add instead of zend_hash_update after zend_hash_find returns NULL

Copy link
Copy Markdown
Member

@ndossche ndossche left a comment

Choose a reason for hiding this comment

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

zend_hash_lookup would be even better (combines find + add)

@arshidkv12 arshidkv12 changed the title ext/spl: Use zend_hash_add() for missing array keys ext/xml: Use zend_hash_add() for missing array keys Mar 26, 2026
Copy link
Copy Markdown
Member

@ndossche ndossche left a comment

Choose a reason for hiding this comment

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

thx

@ndossche ndossche merged commit e5f9650 into php:master Mar 26, 2026
19 checks passed
@arshidkv12
Copy link
Copy Markdown
Contributor Author

You are welcome

@arshidkv12 arshidkv12 deleted the xml-2 branch March 27, 2026 05:43
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.

2 participants