From 9cdef7984f5162fa19ce36852331f79de3561f66 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 17 Nov 2012 01:17:23 +0100 Subject: [PATCH] [ticket/11212] Allow dispatcher to be absent during garbage_collection() PHPBB3-11212 --- phpBB/includes/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dd82c9dc46..4754d5194f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5348,7 +5348,9 @@ function garbage_collection() * @event core.garbage_collection * @since 3.1-A1 */ - $phpbb_dispatcher->dispatch('core.garbage_collection'); + if (!empty($phpbb_dispatcher)) { + $phpbb_dispatcher->dispatch('core.garbage_collection'); + } // Unload cache, must be done before the DB connection if closed if (!empty($cache))