mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-09 08:47:34 +01:00
fixed potential problem with MessageFormatter and broken messages
This commit is contained in:
@@ -220,7 +220,9 @@ class MessageFormatter extends Component
|
||||
if (!isset($token[2])) {
|
||||
return false;
|
||||
}
|
||||
$subtokens = self::tokenizePattern($token[2]);
|
||||
if (($subtokens = self::tokenizePattern($token[2])) === false) {
|
||||
return false;
|
||||
}
|
||||
$c = count($subtokens);
|
||||
for ($k = 0; $k + 1 < $c; $k++) {
|
||||
if (is_array($subtokens[$k]) || !is_array($subtokens[++$k])) {
|
||||
|
||||
Reference in New Issue
Block a user