mirror of
https://github.com/flarum/core.git
synced 2025-07-27 03:30:28 +02:00
Fix error on discussion page
This commit is contained in:
@@ -27,7 +27,7 @@ class Relationship implements ExtenderInterface
|
|||||||
|
|
||||||
$parent::addRelationship($this->name, function ($model) {
|
$parent::addRelationship($this->name, function ($model) {
|
||||||
if ($this->type instanceof Closure) {
|
if ($this->type instanceof Closure) {
|
||||||
return $this->type($model);
|
return call_user_func($this->type, $model);
|
||||||
} elseif ($this->type === 'belongsTo') {
|
} elseif ($this->type === 'belongsTo') {
|
||||||
return $model->belongsTo($this->child, null, null, $this->name);
|
return $model->belongsTo($this->child, null, null, $this->name);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user