Skip to content

Commit 452d6a3

Browse files
committed
Update RelationTrait.php
1 parent 87d5ed0 commit 452d6a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

RelationTrait.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,14 @@ public function getRelationData() {
180180
if($method->name === 'getAttributesWithRelated') {continue;}
181181
if($method->name === 'deleteWithRelated') {continue;}
182182
try {
183-
$rel = $this->{$method->name}();
183+
$rel = call_user_func(array($this,$method->name));
184184
if($rel instanceof \yii\db\ActiveQuery){
185185
$stack[$i]['name'] = lcfirst(str_replace('get', '', $method->name));
186186
$stack[$i]['method'] = $method->name;
187187
$stack[$i]['ismultiple'] = $rel->multiple;
188188
$i++;
189189
}
190-
} catch (\yii\base\ErrorException $exc) {
191-
//
192-
}
190+
} catch (\yii\base\ErrorException $exc) {}
193191
}
194192
return $stack;
195193
}

0 commit comments

Comments
 (0)