Upgrade to KH 3.1.3.1
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @package Kohana
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2007-2008 Kohana Team
|
||||
* @copyright (c) 2007-2011 Kohana Team
|
||||
* @copyright (c) 2005 Harry Fuecks
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||
*/
|
||||
@@ -36,8 +36,8 @@ function _substr($str, $offset, $length = NULL)
|
||||
// PCRE repeating quantifiers must be less than 65536, so repeat when necessary
|
||||
$x = (int) ($offset / 65535);
|
||||
$y = (int) ($offset % 65535);
|
||||
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
|
||||
$regex .= ($y == 0) ? '' : '.{'.$y.'}';
|
||||
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
|
||||
$regex .= ($y == 0) ? '' : ('.{'.$y.'}');
|
||||
}
|
||||
|
||||
// Create a length expression
|
||||
@@ -54,7 +54,7 @@ function _substr($str, $offset, $length = NULL)
|
||||
$x = (int) ($length / 65535);
|
||||
$y = (int) ($length % 65535);
|
||||
$regex .= '(';
|
||||
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
|
||||
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
|
||||
$regex .= '.{'.$y.'})';
|
||||
}
|
||||
// Find length from the right (negative length)
|
||||
@@ -63,7 +63,7 @@ function _substr($str, $offset, $length = NULL)
|
||||
$x = (int) (-$length / 65535);
|
||||
$y = (int) (-$length % 65535);
|
||||
$regex .= '(.*)';
|
||||
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
|
||||
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
|
||||
$regex .= '.{'.$y.'}';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user