MDL-87046 core: Fix shutdown manager early return
If the `\core_shutdown_manager::initialize` method is called multiple times, it should only succeed once. Unfortunately whilst logging existed, the shutdown manager did not actually exit.
This commit is contained in:
@@ -50,6 +50,7 @@ class core_shutdown_manager {
|
||||
public static function initialize() {
|
||||
if (self::$registered) {
|
||||
debugging('Shutdown manager is already initialised!');
|
||||
return;
|
||||
}
|
||||
self::$registered = true;
|
||||
register_shutdown_function(array('core_shutdown_manager', 'shutdown_handler'));
|
||||
|
||||
Reference in New Issue
Block a user