Skip to content

Commit

Permalink
Update RelationTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mootensai committed Feb 24, 2016
1 parent 3c2775a commit d3062f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function loadAll($POST)
} else if ($isHasMany) {
$container = [];
foreach ($value as $relPost) {
if (!empty(array_filter($relPost))) {
if (array_filter($relPost)) {
/* @var $relObj ActiveRecord */
$relObj = (empty($relPost[$relPKAttr[0]])) ? new $relModelClass : $relModelClass::findOne($relPost[$relPKAttr[0]]);
$relObj->load($relPost, '');
Expand Down Expand Up @@ -311,6 +311,7 @@ public function getRelationData()
$i++;
}
} catch (\yii\base\ErrorException $exc) {
//if method name can't be call,
}
}
return $stack;
Expand Down

0 comments on commit d3062f5

Please sign in to comment.