mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Strict checks for I18n::loadLocaleDefinition().
This commit is contained in:
parent
4f91465af7
commit
f4929c1b04
1 changed files with 3 additions and 3 deletions
|
@ -549,10 +549,10 @@ class I18n {
|
|||
continue;
|
||||
}
|
||||
$count = count($parts);
|
||||
if ($count == 2) {
|
||||
if ($count === 2) {
|
||||
$currentToken = $parts[0];
|
||||
$value = $parts[1];
|
||||
} elseif ($count == 1) {
|
||||
} elseif ($count === 1) {
|
||||
$value = is_array($value) ? $parts[0] : $value . $parts[0];
|
||||
} else {
|
||||
continue;
|
||||
|
@ -575,7 +575,7 @@ class I18n {
|
|||
$val = str_replace($replacements, $mustEscape, $val);
|
||||
$value[$i] = $val;
|
||||
}
|
||||
if (count($value) == 1) {
|
||||
if (count($value) === 1) {
|
||||
$definitions[$currentToken] = array_pop($value);
|
||||
} else {
|
||||
$definitions[$currentToken] = $value;
|
||||
|
|
Loading…
Add table
Reference in a new issue