diff --git a/.craftplugin b/.craftplugin index d36c0ed..529a996 100644 --- a/.craftplugin +++ b/.craftplugin @@ -1 +1 @@ -{"pluginName":"Eventbrite","pluginDescription":"Integration with Eventbrite API","pluginVersion":"1.0.0","pluginAuthorName":"Mark @ A Digital","pluginVendorName":"a-digital","pluginAuthorUrl":"https://adigital.agency/","pluginAuthorGithub":"eventbrite","codeComments":"yes","pluginComponents":["controllers","cpsection","services","settings","variables","widgets"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"} \ No newline at end of file +{"pluginName":"Eventbrite","pluginDescription":"Integration with Eventbrite API","pluginVersion":"1.0.8","pluginAuthorName":"Mark @ A Digital","pluginVendorName":"a-digital","pluginAuthorUrl":"https://adigital.agency/","pluginAuthorGithub":"eventbrite","codeComments":"yes","pluginComponents":["controllers","cpsection","services","settings","variables","widgets"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d2864..2e12ddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.8 - 2023-05-09 +### Changed +- Fixed array null with $event + ## 1.0.7 - 2022-09-20 ### Changed - Errors are now suppressed in production environments diff --git a/composer.json b/composer.json index bbaa954..fd910af 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "adigital/eventbrite", "description": "Integration with Eventbrite API", "type": "craft-plugin", - "version": "1.0.7", + "version": "1.0.8", "keywords": [ "craft", "cms", diff --git a/src/services/EventbriteEvents.php b/src/services/EventbriteEvents.php index c86eed3..2699e3d 100644 --- a/src/services/EventbriteEvents.php +++ b/src/services/EventbriteEvents.php @@ -143,7 +143,7 @@ public function getEvent($eventId, $expansions = null, $fullDescription = true, $event = $this->curlWrap($method); $otherEventIds = array_column(json_decode(Eventbrite::$plugin->nonAdminSettings->get()->one()->otherEventIds), 0); - if (($unlistedEvent === false && $event['listed'] === false) || ($event['organization_id'] != Eventbrite::$plugin->getSettings()->organisationId && !array_search($eventId, $otherEventIds))) + if (is_array($event) && ($unlistedEvent === false && $event['listed'] === false) || ($event['organization_id'] != Eventbrite::$plugin->getSettings()->organisationId && !array_search($eventId, $otherEventIds))) { $event = null; }