From ddcc3c225ff35a5e76fbb29cc6fba423205cac3b Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Tue, 2 Feb 2021 08:58:46 -0500 Subject: [PATCH] Update main.controller.php Open use count to use check return by ->get() #101 --- servers/vultr/controller/main.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/vultr/controller/main.controller.php b/servers/vultr/controller/main.controller.php index 90fe737..ad97a50 100755 --- a/servers/vultr/controller/main.controller.php +++ b/servers/vultr/controller/main.controller.php @@ -377,12 +377,12 @@ private function addVMCustomFields($SUBID) ->where('type', 'product') ->where('relid', $this->params['packageid']) ->where('fieldname', 'LIKE', 'subid|%')->get(); - if ($customField) + if (count($customField) > 0) { $customFieldValue = Capsule::table('tblcustomfieldsvalues') ->where('fieldid', $customField[0]->id) ->where('relid', $this->serviceID)->get(); - if ($customFieldValue) + if (count($customFieldValue) > 0) { $customFieldValue = Capsule::table('tblcustomfieldsvalues') ->where('fieldid', $customField[0]->id)