From 64203358dde9a22ac867b12810a50f8f763c58ef Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Tue, 2 Oct 2018 19:44:05 +0200 Subject: [PATCH] txhisto: fix a nullptr if bitcoin wallet not in db --- web/yaamp/modules/site/tx.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/yaamp/modules/site/tx.php b/web/yaamp/modules/site/tx.php index 2ed9cd9..7bc8deb 100644 --- a/web/yaamp/modules/site/tx.php +++ b/web/yaamp/modules/site/tx.php @@ -7,8 +7,6 @@ if(!$user) return; $this->pageTitle = $user->username.' | '.YAAMP_SITE_NAME; -$bitcoin = getdbosql('db_coins', "symbol='BTC'"); - echo "
"; echo "
Transactions to $user->username
"; echo "
"; @@ -26,7 +24,8 @@ echo "Tx"; echo ""; echo ""; -$coin = ($user->coinid == $bitcoin->id) ? $bitcoin : getdbo('db_coins', $user->coinid); +$bitcoin = getdbosql('db_coins', "symbol='BTC'"); +$coin = ($bitcoin && $user->coinid == $bitcoin->id) ? $bitcoin : getdbo('db_coins', $user->coinid); $total = 0; foreach($list as $payout)