From 6b12cfb63a546b4ec2d86cbbfe4b04564d8bb35c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 11 Dec 2017 16:08:31 +0200 Subject: [PATCH] Fix for referral count --- app/Models/Company.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Models/Company.php b/app/Models/Company.php index 7577e1eab394..1873a590fd30 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -160,6 +160,11 @@ class Company extends Eloquent public function getPlanDetails($includeInactive = false, $includeTrial = true) { $account = $this->accounts()->first(); + + if (! $account) { + return false; + } + return $account->getPlanDetails($includeInactive, $includeTrial); }