From c3463fc9a93731789bc6e7367a6e73ebc2041b2a Mon Sep 17 00:00:00 2001 From: Luke Swanson Date: Mon, 2 Dec 2024 11:59:18 -0600 Subject: [PATCH] Oops, put check in wrong spot for actual error we were getting. --- site/gamedata.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/gamedata.php b/site/gamedata.php index 9dbddb1..1d35f76 100644 --- a/site/gamedata.php +++ b/site/gamedata.php @@ -58,9 +58,11 @@ $selected_year = isset($game_files) ? $game_files->getLastYear() : ''; $selected_month = isset($game_files) ? $game_files->getLastMonth() : ''; $selected_date = DateTimeImmutable::createFromFormat('Y-n-j|', $selected_year . '-' . $selected_month . '-1'); - $month_name = $selected_date->format('F'); + if ($selected_date != false) { + $month_name = $selected_date->format('F'); + } // Populate current, previous, and next dates - if ($selected_date != false && $game_files->getNextMonth($selected_date) == $selected_date) { + if ($game_files->getNextMonth($selected_date) == $selected_date) { $next_disabled = 'disabled'; $next_month = $selected_date->modify('+1 month')->format('F'); } else {