Skip to content

Commit

Permalink
fixed PHP warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Aug 27, 2015
1 parent cf01fea commit b89f0c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public function update($runValidation = true, $attributes = null, $options = [])

foreach ($this->models as $key => $model) {
$changedAttributes = [];
$values = &$data[$key];
$values = array_key_exists($key, $data) ? $data[$key] : $data[$model->id]; /// XXX not good
foreach ($values as $name => $value) {
/* @var $model ActiveRecord */
$changedAttributes[$name] = $model->getOldAttribute($name);
Expand Down

0 comments on commit b89f0c8

Please sign in to comment.