BUGFIX Limiting ?debug_memory parameter to development environments through using Debug::message() instead of a straight echo()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74067 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-04-03 18:40:19 +00:00
parent 740dfef39e
commit 7d8186f247

View File

@ -139,7 +139,10 @@ class Director {
// ?debug_memory=1 will output the number of bytes of memory used for this request // ?debug_memory=1 will output the number of bytes of memory used for this request
if(isset($_REQUEST['debug_memory']) && $_REQUEST['debug_memory']) { if(isset($_REQUEST['debug_memory']) && $_REQUEST['debug_memory']) {
echo number_format(memory_get_peak_usage(),0); Debug::message(sprintf(
"Peak memory usage in bytes: %s",
number_format(memory_get_peak_usage(),0)
));
} else { } else {
$response->output(); $response->output();
} }