Skip to content

Commit 62826e9

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback. Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
2 parents 796d11c + 92c23e1 commit 62826e9

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Zend/zend_API.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,6 +2381,12 @@ void module_destructor(zend_module_entry *module) /* {{{ */
23812381
module->module_shutdown_func(module->type, module->module_number);
23822382
}
23832383

2384+
if (module->module_started
2385+
&& !module->module_shutdown_func
2386+
&& module->type == MODULE_TEMPORARY) {
2387+
zend_unregister_ini_entries(module->module_number);
2388+
}
2389+
23842390
/* Deinitilaise module globals */
23852391
if (module->globals_size) {
23862392
#ifdef ZTS

ext/gd/gd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ PHP_MSHUTDOWN_FUNCTION(gd)
595595
#if defined(HAVE_GD_FREETYPE) && defined(HAVE_GD_BUNDLED)
596596
gdFontCacheMutexShutdown();
597597
#endif
598+
UNREGISTER_INI_ENTRIES();
598599
return SUCCESS;
599600
}
600601
/* }}} */

ext/phar/phar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,6 +3428,7 @@ PHP_MSHUTDOWN_FUNCTION(phar) /* {{{ */
34283428
zend_hash_destroy(&(cached_alias));
34293429
}
34303430

3431+
UNREGISTER_INI_ENTRIES();
34313432
return SUCCESS;
34323433
}
34333434
/* }}} */

0 commit comments

Comments
 (0)