Fix array keys
This commit is contained in:
parent
2322eb3e66
commit
483c563526
|
@ -13,11 +13,11 @@ if (!array_key_exists($blog_slug, $eventsConfig)) {
|
||||||
|
|
||||||
$now = new DateTimeImmutable('now');
|
$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);
|
$eventStartInterval = $now->diff($eventStart);
|
||||||
$isBeforeEvent = $eventStartInterval instanceof DateInterval && $eventStartInterval->invert === 0;
|
$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);
|
$eventEndInterval = $now->diff($eventEnd);
|
||||||
$isAfterEvent = $eventEndInterval instanceof DateInterval && $eventEndInterval->invert === 1;
|
$isAfterEvent = $eventEndInterval instanceof DateInterval && $eventEndInterval->invert === 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue