Browse Source

fix BaseArrayHelper::isIn() in strict mode

close #11686
ar-bug
taobig 8 years ago committed by Carsten Brandt
parent
commit
2238c32098
  1. 1
      framework/CHANGELOG.md
  2. 2
      framework/helpers/BaseArrayHelper.php

1
framework/CHANGELOG.md

@ -25,6 +25,7 @@ Yii Framework 2 Change Log
- Bug #11571: Fixed `yii\db\ColumnSchemaBuilder` to work with custom column types (andrey-mokhov, silverfire)
- Bug #11662: Fixed `schema-oci.sql` for RBAC (jonny7)
- Bug #11527: Fixed `bigPrimaryKey()` for SQLite (dynasource)
- Bug #11686: `BaseArrayHelper::isIn()` comparison did not work in strict mode (taobig)
2.0.8 April 28, 2016

2
framework/helpers/BaseArrayHelper.php

@ -699,7 +699,7 @@ class BaseArrayHelper
{
if ($haystack instanceof \Traversable) {
foreach ($haystack as $value) {
if ($needle == $value && (!$strict || $needle === $haystack)) {
if ($needle == $value && (!$strict || $needle === $value)) {
return true;
}
}

Loading…
Cancel
Save