Fix array keys

This commit is contained in:
Vencislav Atanasov 2024-10-30 21:38:20 +02:00
parent 2322eb3e66
commit 483c563526
1 changed files with 2 additions and 2 deletions

View File

@ -13,11 +13,11 @@ if (!array_key_exists($blog_slug, $eventsConfig)) {
$now = new DateTimeImmutable('now');
$eventStart = new DateTimeImmutable($eventsConfig[$blog_slug]['eventStart'] . ' Europe/Sofia');
$eventStart = new DateTimeImmutable($eventsConfig[$blog_slug]['startTime'] . ' Europe/Sofia');
$eventStartInterval = $now->diff($eventStart);
$isBeforeEvent = $eventStartInterval instanceof DateInterval && $eventStartInterval->invert === 0;
$eventEnd = new DateTimeImmutable($eventsConfig[$blog_slug]['eventEnd'] . ' Europe/Sofia');
$eventEnd = new DateTimeImmutable($eventsConfig[$blog_slug]['endTime'] . ' Europe/Sofia');
$eventEndInterval = $now->diff($eventEnd);
$isAfterEvent = $eventEndInterval instanceof DateInterval && $eventEndInterval->invert === 1;