From f2deebf5291f08d81594890b29f7d35deaffb2e8 Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 12 Oct 2009 11:51:44 +0000 Subject: [PATCH] for memory_get_usage, change checking routine from version compare to function exist git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6852 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index 2f64631d2..4717b5294 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -499,7 +499,7 @@ if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '6.0.0') === -1) { if(!isset($firephp)) $firephp = FirePHP::getInstance(true); - if(version_compare(PHP_VERSION, "4.3.2", ">=")) + if(function_exists("memory_get_usage")) { $label = sprintf('[%s:%d] (m:%s)', $file_name, $line_num, FileHandler::filesize(memory_get_usage())); } @@ -521,7 +521,7 @@ } else { $debug_file = _XE_PATH_.'files/_debug_message.php'; - if(version_compare(PHP_VERSION, "4.3.2", ">=")) + if(function_exists("memory_get_usage")) { $debug_output = sprintf("[%s %s:%d] - mem(%s)\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, FileHandler::filesize(memory_get_usage()), print_r($debug_output, true)); }