From 15658a7cbfd181a76188c7c94d6fe0fe39ad8d80 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 18 May 2015 08:00:14 +0930 Subject: [PATCH] Fix error on discussion page --- framework/core/src/Extend/Relationship.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Extend/Relationship.php b/framework/core/src/Extend/Relationship.php index 895901f42..de16a6724 100644 --- a/framework/core/src/Extend/Relationship.php +++ b/framework/core/src/Extend/Relationship.php @@ -27,7 +27,7 @@ class Relationship implements ExtenderInterface $parent::addRelationship($this->name, function ($model) { if ($this->type instanceof Closure) { - return $this->type($model); + return call_user_func($this->type, $model); } elseif ($this->type === 'belongsTo') { return $model->belongsTo($this->child, null, null, $this->name); } else {