OSDN Git Service
(root)
/
nucleus-jp
/
nucleus-next.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a803a6e
)
FIX: i18n::substr()のバグ修正
author
sakamocchi
<o-takashi@sakamocchi.jp>
Sat, 12 May 2012 10:27:25 +0000
(19:27 +0900)
committer
sakamocchi
<o-takashi@sakamocchi.jp>
Sat, 12 May 2012 10:28:43 +0000
(19:28 +0900)
self::$current_charsetを第4引数にわたさなければならないが、第3引数である$length引数0である場合があり、望む文字列が偉られなかった。
nucleus/libs/i18n.php
patch
|
blob
|
history
diff --git
a/nucleus/libs/i18n.php
b/nucleus/libs/i18n.php
index
96cba69
..
27b1c95
100644
(file)
--- a/
nucleus/libs/i18n.php
+++ b/
nucleus/libs/i18n.php
@@
-445,6
+445,12
@@
class i18n
static public function substr($string, $start, $length=0)
\r
{
\r
$return = '';
\r
+
\r
+ if ( $length = 0 )
\r
+ {
\r
+ $length = self::strlen($string) - $start;
\r
+ }
\r
+
\r
if ( self::$mode == 'iconv' )
\r
{
\r
$return = iconv_substr($string, $start, $length, self::$current_charset);
\r