From 41371022b83648ad1a6b6f3bc666aa1d08b2b35e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 11 Dec 2017 16:08:18 +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 ddb01766aa..c7ae9e8733 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -155,6 +155,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); }