-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add libxml_get_external_entity_loader() #7977
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
Conversation
9e28332
to
dfacdbf
Compare
Apology for the late review. Personally I would prefer introducing a new function for this (could be simply
I actually did a bit of search in GitHub and haven't found such piece of code (just comparisons with |
dfacdbf
to
95f07fe
Compare
@bukka Done. Do you want me to squash the commits or write some docs? |
Is this ready to go now? I think I have responded to all the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. Please can you squash it?
300746d
to
0466b35
Compare
@bukka Done, squashed |
@tstarling Just FYI I messaged internals if this and few other things could be added before the first 8.2 RC. If there are no objection, I will merge it later next week. If you have some spare time and could maybe use that |
🎗️ If this does go into PHP 8.2, it will need a changelog entry in |
Add libxml_get_external_entity_loader(), which returns the currently installed external entity loader, i.e. the value which was passed to libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used. This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest of the application. Add macro Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(). This allows us to get the zval for a callable parameter without duplicating callable argument parsing. The saved zval keeps the object needed for fcc/fci alive, simplifying memory management. Fixes #76763.
0466b35
to
35117a6
Compare
I added Z_PARAM_FUNC_OR_NULL_WITH_ZVAL() and added an entry to UPGRADING. |
AppVeyor says
Pretty sure that's not my fault. |
Merged via 1179622 . Thanks! |
Fixes https://bugs.php.net/bug.php?id=76763 . Our motivation is https://phabricator.wikimedia.org/T268847