aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/index.php b/index.php
index b73e0b98..236fd4e2 100644
--- a/index.php
+++ b/index.php
@@ -945,16 +945,22 @@ function showDaily()
945 945
946 $days = $LINKSDB->days(); 946 $days = $LINKSDB->days();
947 $i = array_search($day,$days); 947 $i = array_search($day,$days);
948 if ($i==false) { $i=count($days)-1; $day=$days[$i]; } 948 if ($i===false) { $i=count($days)-1; $day=$days[$i]; }
949 $previousday=''; 949 $previousday='';
950 $nextday=''; 950 $nextday='';
951 if ($i!==false) 951 if ($i!==false)
952 { 952 {
953 if ($i>1) $previousday=$days[$i-1]; 953 if ($i>=1) $previousday=$days[$i-1];
954 if ($i<count($days)-1) $nextday=$days[$i+1]; 954 if ($i<count($days)-1) $nextday=$days[$i+1];
955 } 955 }
956 956
957 $linksToDisplay=$LINKSDB->filterDay($day); 957 try {
958 $linksToDisplay = $LINKSDB->filterDay($day);
959 } catch (Exception $exc) {
960 error_log($exc);
961 $linksToDisplay = [];
962 }
963
958 // We pre-format some fields for proper output. 964 // We pre-format some fields for proper output.
959 foreach($linksToDisplay as $key=>$link) 965 foreach($linksToDisplay as $key=>$link)
960 { 966 {