From d28e728d6ca8d74e8d3024ee2a0421d83a061d7b Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 22 Aug 2013 11:28:18 +0200 Subject: [PATCH] minor cleanup --- public/include/smarty_globals.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 4ced2de7..27d980e6 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -9,10 +9,12 @@ $debug->append('Global smarty variables', 3); $debug->append('No cached page detected, loading smarty globals', 3); // Defaults to get rid of PHP Notice warnings $dDifficulty = 1; -$aRoundShares = 1; -// Only run these if the user is logged in -$aRoundShares = $statistics->getRoundShares(); +// Fetch round shares +if (!$aRoundShares = $statistics->getRoundShares()) { + $aRoundShares = array('valid' => 0, 'invalid' => 0); +} + if ($bitcoin->can_connect() === true) { $dDifficulty = $bitcoin->query('getdifficulty'); if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))