diff --git a/admin.php b/admin.php index 004a9d5..a5c46b5 100644 --- a/admin.php +++ b/admin.php @@ -131,12 +131,19 @@ locale); + if ($eventsRaw === false) { + die('Could not fetch data from ' . $eventsEndpoint); + } [ "litcal_events" => $LitCalAllFestivities ] = json_decode( - file_get_contents("$eventsEndpoint?locale=" . $i18n->locale), + $eventsRaw, true ); + if (JSON_ERROR_NONE !== json_last_error()) { + die('Could not parse JSON from ' . $eventsEndpoint . ' : ' . json_last_error_msg()); + } } include_once 'components/NewTestModal.php'; ?> @@ -174,7 +181,6 @@ class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16"
const LitCalTests = Object.freeze($response); let LitCalAllFestivities = Object.freeze($LitEventKeys);"; +echo ""; include_once 'layout/footer.php'; ?>