We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 78c300e + 30d5d16 commit de781d6Copy full SHA for de781d6
CHANGELOG.md
@@ -3,6 +3,7 @@ Yii2 multiple input change log
3
4
2.18.0 (in development)
5
=======================
6
+- #246 accept `\Traversable` in model attribute for `yield` compatibility (bscheshirwork)
7
8
2.17.0
9
======
src/MultipleInput.php
@@ -254,7 +254,11 @@ protected function initData()
254
return;
255
}
256
257
- foreach ((array) $data as $index => $value) {
+ if (!($data instanceof \Traversable)) {
258
+ $data = (array) $data;
259
+ }
260
+
261
+ foreach ($data as $index => $value) {
262
$this->data[$index] = $value;
263
264
0 commit comments