Skip to content

Commit 1033af1

Browse files
author
Jani Taskinen
committed
MFH: Fixed module loading order and made request shutdown functions also to
be loaded in reverse like all other shutdowns are.
1 parent f67e7f4 commit 1033af1

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ void zend_deactivate_modules(TSRMLS_D) /* {{{ */
863863
EG(opline_ptr) = NULL; /* we're no longer executing anything */
864864

865865
zend_try {
866-
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
866+
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
867867
} zend_end_try();
868868
}
869869
/* }}} */

build/order_by_dep.awk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ END {
7979
out_count = 0;
8080

8181
while (count(mods)) {
82-
# count down, since we need to assemble it in reverse order
83-
for (i = mod_count-1; i >= 0; --i) {
82+
for (i = 0; i <= mod_count; i++) {
8483
if (i in mods) {
8584
do_deps(i);
8685
}
File renamed without changes.

ext/date/php_date.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,17 +563,11 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC);
563563
zval *date_interval_read_property(zval *object, zval *member, int type TSRMLS_DC);
564564
void date_interval_write_property(zval *object, zval *member, zval *value TSRMLS_DC);
565565

566-
/* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */
567-
static const zend_module_dep date_deps[] = {
568-
ZEND_MOD_OPTIONAL("session")
569-
{NULL, NULL, NULL}
570-
};
571-
572566
/* {{{ Module struct */
573567
zend_module_entry date_module_entry = {
574568
STANDARD_MODULE_HEADER_EX,
575569
NULL,
576-
date_deps,
570+
NULL,
577571
"date", /* extension name */
578572
date_functions, /* function list */
579573
PHP_MINIT(date), /* process startup */

0 commit comments

Comments
 (0)