aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 3 insertions, 1 deletions
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))