From 325827c40f778ef7efd3c195706cb0b1fb28805b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 24 Mar 2012 16:43:26 +0100 Subject: [PATCH] [ticket/10714] Inject the global $phpbb_log into view_log() PHPBB3-10714 --- phpBB/common.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/common.php b/phpBB/common.php index bbcf8b894f..799c1162b1 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -76,6 +76,7 @@ if (!empty($load_extensions) && function_exists('dl')) require($phpbb_root_path . 'includes/class_loader.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); +require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/functions_content.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); @@ -142,6 +143,10 @@ foreach ($cache->obtain_hooks() as $hook) // make sure add_log uses this log instance $phpbb_log = new phpbb_log(LOG_TABLE); add_log($phpbb_log); // "dependency injection" for a function +// Parameter 2 and 3 are passed by reference, so we need to create a variable for it. +$tmp_var = ''; +view_log($phpbb_log, $tmp_var, $tmp_var); // "dependency injection" for a function +unset($tmp_var); if (!$config['use_system_cron']) {