aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-06-13 14:54:13 +0200
committerTristan Darricau <github@nicofuma.fr>2014-06-13 14:54:13 +0200
commitc605e8f42368aadd23ae00169a5e5489e400fc95 (patch)
treefe1e3a028b1378045ec9c5b8504b0e5b0b61e01d /phpBB/includes/functions.php
parentdc4132a49458b4a0ce8e8a80cf329e902108b575 (diff)
downloadforums-c605e8f42368aadd23ae00169a5e5489e400fc95.tar
forums-c605e8f42368aadd23ae00169a5e5489e400fc95.tar.gz
forums-c605e8f42368aadd23ae00169a5e5489e400fc95.tar.bz2
forums-c605e8f42368aadd23ae00169a5e5489e400fc95.tar.xz
forums-c605e8f42368aadd23ae00169a5e5489e400fc95.zip
[ticket/12687] Don't check if memory_get_peak_usage() exists
PHPBB3-12687
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 7f36062c20..d1d23ffa13 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5068,15 +5068,12 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb
$debug_info[] = $db->sql_num_queries() . ' Queries';
- if (function_exists('memory_get_peak_usage'))
+ $memory_usage = memory_get_peak_usage();
+ if ($memory_usage)
{
- $memory_usage = memory_get_peak_usage();
- if ($memory_usage)
- {
- $memory_usage = get_formatted_filesize($memory_usage);
+ $memory_usage = get_formatted_filesize($memory_usage);
- $debug_info[] = 'Peak Memory Usage: ' . $memory_usage;
- }
+ $debug_info[] = 'Peak Memory Usage: ' . $memory_usage;
}
}