diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-03-04 18:15:56 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-04 18:15:56 +0000 |
| commit | 014999758e2f4efa433a9c4e71d0551e0b5b318a (patch) | |
| tree | 8d15d1130c44849ddee8fcb9f6c9aa7603822b99 /kohana/core/Kohana.php | |
| parent | c0e65b202977c78c4562502373f630b8f835f1ff (diff) | |
Updated Kohana to r4033
Diffstat (limited to 'kohana/core/Kohana.php')
| -rw-r--r-- | kohana/core/Kohana.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kohana/core/Kohana.php b/kohana/core/Kohana.php index 76964fbd..7f9b87da 100644 --- a/kohana/core/Kohana.php +++ b/kohana/core/Kohana.php @@ -105,7 +105,7 @@ final class Kohana { $ER = error_reporting(~E_NOTICE & ~E_STRICT); // Set the user agent - self::$user_agent = trim($_SERVER['HTTP_USER_AGENT']); + self::$user_agent = ( ! empty($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : ''); if (function_exists('date_default_timezone_set')) { @@ -694,14 +694,14 @@ final class Kohana { */ public static function render($output) { - // Fetch memory usage in MB - $memory = function_exists('memory_get_usage') ? (memory_get_usage() / 1024 / 1024) : 0; - - // Fetch benchmark for page execution time - $benchmark = Benchmark::get(SYSTEM_BENCHMARK.'_total_execution'); - if (self::config('core.render_stats') === TRUE) { + // Fetch memory usage in MB + $memory = function_exists('memory_get_usage') ? (memory_get_usage() / 1024 / 1024) : 0; + + // Fetch benchmark for page execution time + $benchmark = Benchmark::get(SYSTEM_BENCHMARK.'_total_execution'); + // Replace the global template variables $output = str_replace( array |
