mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12687] Wrap $GLOBALS['starttime'] in a if
PHPBB3-12687
This commit is contained in:
parent
f7f65fe6c2
commit
dc4132a494
1 changed files with 5 additions and 2 deletions
|
@ -5059,10 +5059,13 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb
|
||||||
|
|
||||||
// Output page creation time
|
// Output page creation time
|
||||||
if (defined('PHPBB_DISPLAY_LOAD_TIME'))
|
if (defined('PHPBB_DISPLAY_LOAD_TIME'))
|
||||||
|
{
|
||||||
|
if (isset($GLOBALS['starttime']))
|
||||||
{
|
{
|
||||||
$totaltime = microtime(true) - $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';
|
$debug_info[] = $db->sql_num_queries() . ' Queries';
|
||||||
|
|
||||||
if (function_exists('memory_get_peak_usage'))
|
if (function_exists('memory_get_peak_usage'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue