-
Couldn't load subscription status.
- Fork 8k
Fix GH-12215: Module entry being overwritten causes type errors in ext/dom #12246
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,9 +59,7 @@ zend_module_entry zend_builtin_module = { /* {{{ */ | |
|
|
||
| zend_result zend_startup_builtin_functions(void) /* {{{ */ | ||
| { | ||
| zend_builtin_module.module_number = 0; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, unless I change the implementation of zend_next_free_module to not add 1. |
||
| zend_builtin_module.type = MODULE_PERSISTENT; | ||
| return (EG(current_module) = zend_register_module_ex(&zend_builtin_module)) == NULL ? FAILURE : SUCCESS; | ||
| return (EG(current_module) = zend_register_module_ex(&zend_builtin_module, MODULE_PERSISTENT)) == NULL ? FAILURE : SUCCESS; | ||
| } | ||
| /* }}} */ | ||
|
|
||
|
|
||
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.
Why do you call
zend_next_free_module();at this point?May be it's better to delay it until the
module->module_numberasisgnment?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.
zend_next_free_moduledoeszend_hash_num_elements(&module_registry) + 1;. So if I move it after adding, the module numbers start at 2.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.
OK. I don't see any problems. I think the old PR may be merged into old branches and this one into master.