mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
740dfef39e
commit
7d8186f247
@ -139,7 +139,10 @@ class Director {
|
||||
|
||||
// ?debug_memory=1 will output the number of bytes of memory used for this request
|
||||
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 {
|
||||
$response->output();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user