Skip to content

Commit f8c5e13

Browse files
committed
--
--
1 parent 41784f3 commit f8c5e13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kchat/actions/plotly.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function action(){
3030
//generating start and end date of plot
3131
$plot = json_decode($file_json,1);
3232
$start = array_keys($plot);
33+
if(!isset($start[0])){
34+
$start[0] = date("Y-m-d H:0:0",time() - 604800);
35+
}
3336
$start = strtotime($start[0]);
3437
$end = strtotime(date("Y-m-d H:00:00"));
3538
$current = strtotime(date("Y-m-d H:00:00", $start));

0 commit comments

Comments
 (0)