Skip to content

Commit

Permalink
fix: passing null to in_array
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbrink committed Feb 27, 2024
1 parent fd1e5b6 commit b1922bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/php/PostTypes/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function singleViewData($data)
];

$data['eventLang'] = (object) array(
'accessibilityLabels' => array_filter($accessibilityLabels, fn($key) => in_array($key, $locationInfo['accessibility']), ARRAY_FILTER_USE_KEY),
'accessibilityLabels' => array_filter($accessibilityLabels, fn($key) => in_array($key, $locationInfo['accessibility'] ?? []), ARRAY_FILTER_USE_KEY),
'link' => __('Event link', 'event-integration'),
'ticket' => __('Ticket', 'event-integration'),
'goToEventWebsite' => __('Go to event website', 'event-integration'),
Expand Down

0 comments on commit b1922bf

Please sign in to comment.