Fixes #11739: Fixed ArrayHelper::index() losing precision for float keys

This commit is contained in:
AnikanovD
2016-06-19 13:49:59 +03:00
committed by Alexander Makarov
parent 0e3fc540cd
commit 239d7814eb
3 changed files with 28 additions and 0 deletions

View File

@ -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;
}
}