Skip to content

Commit

Permalink
Update main.controller.php
Browse files Browse the repository at this point in the history
 Open
use count to use check return by ->get()
vultr#101
  • Loading branch information
whattheserver authored Feb 2, 2021
1 parent 94f2ba3 commit ddcc3c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/vultr/controller/main.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ddcc3c2

Please sign in to comment.