From c5af0d72e452f7565f19cfe2f95d7df02898111e Mon Sep 17 00:00:00 2001 From: cp6 Date: Wed, 27 Jan 2021 13:54:33 +1100 Subject: [PATCH] Fixed on no domains errors thrown in info card Fixed on no domains errors thrown in info card --- class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/class.php b/class.php index 5e95f23..b3f5de4 100644 --- a/class.php +++ b/class.php @@ -2632,7 +2632,12 @@ class idlers extends helperFunctions $oldest_d = $this->dbConnect()->prepare("SELECT `domain`, `owned_since` FROM `domains` ORDER BY `owned_since`;"); $oldest_d->execute(); - $oldest_d_row = $oldest_d->fetchAll(PDO::FETCH_ASSOC)[0]; + if (isset($oldest_d->fetchAll(PDO::FETCH_ASSOC)[0])){ + $oldest_d_row = $oldest_d->fetchAll(PDO::FETCH_ASSOC)[0]; + } else { + $oldest_d_row = array('domain' => null, 'owned_since' => null); + } + $sel_price = $this->dbConnect()->prepare("SELECT `as_usd`, `term`, `usd_per_month` FROM `pricing`;"); $sel_price->execute();