diff --git a/event/listener.php b/event/listener.php index 696104f..e003e98 100644 --- a/event/listener.php +++ b/event/listener.php @@ -142,11 +142,11 @@ public function get_cron_tasks(&$cronlock, $get_last_task = false) $prune = $this->db->sql_fetchrow($result); $rows[] = array( "config_name" => "prune_forum_last_gc", // This is the time of the last Cron Job, not the time of pruned forums. - "config_value" => $prune['prune_next'] - $prune['prune_time'], + "config_value" => ($prune['prune_next'] ?? 0) - ($prune['prune_time'] ?? 0), ); $rows[] = array( "config_name" => "prune_forum_gc", - "config_value" => $prune['prune_time'], + "config_value" => $prune['prune_time'] ?? 0, ); $this->db->sql_freeresult($result); @@ -155,11 +155,11 @@ public function get_cron_tasks(&$cronlock, $get_last_task = false) $prune_shadow = $this->db->sql_fetchrow($result); $rows[] = array( "config_name" => "prune_shadow_topics_last_gc", // This is the time of the last Cron Job, not the time of pruned shadow topics. - "config_value" => $prune_shadow['prune_shadow_next'] - $prune_shadow['prune_shadow_time'], + "config_value" => ($prune_shadow['prune_shadow_next'] ?? 0) - ($prune_shadow['prune_shadow_time'] ?? 0), ); $rows[] = array( "config_name" => "prune_shadow_topics_gc", - "config_value" => $prune_shadow['prune_shadow_time'], + "config_value" => $prune_shadow['prune_shadow_time'] ?? 0, ); $this->db->sql_freeresult($result);