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.
1 parent 87d5ed0 commit 452d6a3Copy full SHA for 452d6a3
RelationTrait.php
@@ -180,16 +180,14 @@ public function getRelationData() {
180
if($method->name === 'getAttributesWithRelated') {continue;}
181
if($method->name === 'deleteWithRelated') {continue;}
182
try {
183
- $rel = $this->{$method->name}();
+ $rel = call_user_func(array($this,$method->name));
184
if($rel instanceof \yii\db\ActiveQuery){
185
$stack[$i]['name'] = lcfirst(str_replace('get', '', $method->name));
186
$stack[$i]['method'] = $method->name;
187
$stack[$i]['ismultiple'] = $rel->multiple;
188
$i++;
189
}
190
- } catch (\yii\base\ErrorException $exc) {
191
-//
192
- }
+ } catch (\yii\base\ErrorException $exc) {}
193
194
return $stack;
195
0 commit comments