diff options
Diffstat (limited to 'kohana/core')
-rw-r--r-- | kohana/core/Bootstrap.php | 2 | ||||
-rw-r--r-- | kohana/core/Event.php | 6 | ||||
-rw-r--r-- | kohana/core/Kohana.php | 14 | ||||
-rw-r--r-- | kohana/core/utf8/ord.php | 2 | ||||
-rw-r--r-- | kohana/core/utf8/str_pad.php | 2 | ||||
-rw-r--r-- | kohana/core/utf8/strcspn.php | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/kohana/core/Bootstrap.php b/kohana/core/Bootstrap.php index 57db1648..0190eb9d 100644 --- a/kohana/core/Bootstrap.php +++ b/kohana/core/Bootstrap.php @@ -10,7 +10,7 @@ * @license http://kohanaphp.com/license.html */ -define('KOHANA_VERSION', '2.3'); +define('KOHANA_VERSION', '2.3.2'); define('KOHANA_CODENAME', 'accipiter'); // Test of Kohana is running in Windows diff --git a/kohana/core/Event.php b/kohana/core/Event.php index 89c6a087..456dca09 100644 --- a/kohana/core/Event.php +++ b/kohana/core/Event.php @@ -212,10 +212,10 @@ final class Event { // Do this to prevent data from getting 'stuck' $clear_data = ''; self::$data =& $clear_data; - - // The event has been run! - self::$has_run[$name] = $name; } + + // The event has been run! + self::$has_run[$name] = $name; } /** 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 diff --git a/kohana/core/utf8/ord.php b/kohana/core/utf8/ord.php index 29723b6b..76e31872 100644 --- a/kohana/core/utf8/ord.php +++ b/kohana/core/utf8/ord.php @@ -77,7 +77,7 @@ function _ord($chr) if ($ord0 >= 252 AND $ord0 <= 253) { - return ($ord0 - 252) * 1073741824 + ($ord1 - 128) * 16777216 + ($ord2 - 128) * 262144 + ($ord3 - 128) * 4096 + ($ord4 - 128) * 64 + (ord($c[5]) - 128); + return ($ord0 - 252) * 1073741824 + ($ord1 - 128) * 16777216 + ($ord2 - 128) * 262144 + ($ord3 - 128) * 4096 + ($ord4 - 128) * 64 + (ord($chr[5]) - 128); } if ($ord0 >= 254 AND $ord0 <= 255) diff --git a/kohana/core/utf8/str_pad.php b/kohana/core/utf8/str_pad.php index 63e27f0e..aab4ccc7 100644 --- a/kohana/core/utf8/str_pad.php +++ b/kohana/core/utf8/str_pad.php @@ -50,5 +50,5 @@ function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_R return $pad_left.$str.$pad_right; } - trigger_error('utf8::str_pad: Unknown padding type (' . $type . ')', E_USER_ERROR); + trigger_error('utf8::str_pad: Unknown padding type (' . $pad_type . ')', E_USER_ERROR); }
\ No newline at end of file diff --git a/kohana/core/utf8/strcspn.php b/kohana/core/utf8/strcspn.php index abd93d57..20d3e802 100644 --- a/kohana/core/utf8/strcspn.php +++ b/kohana/core/utf8/strcspn.php @@ -16,7 +16,7 @@ function _strcspn($str, $mask, $offset = NULL, $length = NULL) if (utf8::is_ascii($str) AND utf8::is_ascii($mask)) return ($offset === NULL) ? strcspn($str, $mask) : (($length === NULL) ? strcspn($str, $mask, $offset) : strcspn($str, $mask, $offset, $length)); - if ($start !== NULL OR $length !== NULL) + if ($str !== NULL OR $length !== NULL) { $str = utf8::substr($str, $offset, $length); } |