Upgraded to KH 3.3.0
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
/**
|
||||
* UTF8::from_unicode
|
||||
*
|
||||
* @package Kohana
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2007-2011 Kohana Team
|
||||
* @copyright (c) 2007-2012 Kohana Team
|
||||
* @copyright (c) 2005 Harry Fuecks
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||
*/
|
||||
@@ -36,8 +36,10 @@ function _from_unicode($arr)
|
||||
elseif ($arr[$k] >= 0xD800 AND $arr[$k] <= 0xDFFF)
|
||||
{
|
||||
// Found a surrogate
|
||||
trigger_error('UTF8::from_unicode: Illegal surrogate at index: '.$k.', value: '.$arr[$k], E_USER_WARNING);
|
||||
return FALSE;
|
||||
throw new UTF8_Exception("UTF8::from_unicode: Illegal surrogate at index: ':index', value: ':value'", array(
|
||||
':index' => $k,
|
||||
':value' => $arr[$k],
|
||||
));
|
||||
}
|
||||
// 3 byte sequence
|
||||
elseif ($arr[$k] <= 0xffff)
|
||||
@@ -57,8 +59,10 @@ function _from_unicode($arr)
|
||||
// Out of range
|
||||
else
|
||||
{
|
||||
trigger_error('UTF8::from_unicode: Codepoint out of Unicode range at index: '.$k.', value: '.$arr[$k], E_USER_WARNING);
|
||||
return FALSE;
|
||||
throw new UTF8_Exception("UTF8::from_unicode: Codepoint out of Unicode range at index: ':index', value: ':value'", array(
|
||||
':index' => $k,
|
||||
':value' => $arr[$k],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user