mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-24 07:57:10 +01:00
Fixes #11739: Fixed ArrayHelper::index() losing precision for float keys
This commit is contained in:
committed by
Alexander Makarov
parent
0e3fc540cd
commit
239d7814eb
@@ -363,6 +363,9 @@ class BaseArrayHelper
|
||||
} else {
|
||||
$value = static::getValue($element, $key);
|
||||
if ($value !== null) {
|
||||
if (is_float($value)) {
|
||||
$value = (string) $value;
|
||||
}
|
||||
$lastArray[$value] = $element;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user