diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-06-13 14:53:30 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-06-13 14:53:30 +0200 |
commit | dc4132a49458b4a0ce8e8a80cf329e902108b575 (patch) | |
tree | 00543ae3f608c8ab65d70eb437836ff890072074 /phpBB/includes | |
parent | f7f65fe6c2d77682214d3aca0fcfcd185566475b (diff) | |
download | forums-dc4132a49458b4a0ce8e8a80cf329e902108b575.tar forums-dc4132a49458b4a0ce8e8a80cf329e902108b575.tar.gz forums-dc4132a49458b4a0ce8e8a80cf329e902108b575.tar.bz2 forums-dc4132a49458b4a0ce8e8a80cf329e902108b575.tar.xz forums-dc4132a49458b4a0ce8e8a80cf329e902108b575.zip |
[ticket/12687] Wrap $GLOBALS['starttime'] in a if
PHPBB3-12687
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 7 |
1 files 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')) |