Skip to content

Commit

Permalink
Fix observer leak
Browse files Browse the repository at this point in the history
Make sure to startup observer infrastructure before we register
the first observer...
  • Loading branch information
nikic committed Sep 15, 2020
1 parent e413b4c commit ec3f300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
zend_startup(&zuf);
zend_update_current_locale();

zend_observer_startup();
#if ZEND_DEBUG
zend_observer_error_register(report_zend_debug_error_notify_cb);
#endif
Expand Down Expand Up @@ -2192,7 +2193,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
php_startup_auto_globals();
zend_set_utility_values(&zuv);
php_startup_sapi_content_types();
zend_observer_startup();

/* startup extensions statically compiled in */
if (php_register_internal_extensions_func() == FAILURE) {
Expand Down

0 comments on commit ec3f300

Please sign in to comment.