Commit d1663a5f by Carsten Brandt

fixed potential problem with MessageFormatter and broken messages

parent 27659d17
......@@ -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])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment