From dc4132a49458b4a0ce8e8a80cf329e902108b575 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 13 Jun 2014 14:53:30 +0200 Subject: [PATCH] [ticket/12687] Wrap $GLOBALS['starttime'] in a if PHPBB3-12687 --- phpBB/includes/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e554ee8cee..7f36062c20 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5060,9 +5060,12 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb // Output page creation time if (defined('PHPBB_DISPLAY_LOAD_TIME')) { - $totaltime = microtime(true) - $GLOBALS['starttime']; + if (isset($GLOBALS['starttime'])) + { + $totaltime = microtime(true) - $GLOBALS['starttime']; + $debug_info[] = sprintf('Time : %.3fs', $totaltime); + } - $debug_info[] = sprintf('Time : %.3fs', $totaltime); $debug_info[] = $db->sql_num_queries() . ' Queries'; if (function_exists('memory_get_peak_usage'))