From 64f47bfb1d1e0d52bebc3f4b06baff9040800dc2 Mon Sep 17 00:00:00 2001 From: Matt Shearing Date: Thu, 22 Jun 2023 10:59:09 +0100 Subject: [PATCH] fixed issue - array_column expecting array, object given --- .craftplugin | 2 +- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/services/EventbriteEvents.php | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.craftplugin b/.craftplugin index 529a996..aaafb6f 100644 --- a/.craftplugin +++ b/.craftplugin @@ -1 +1 @@ -{"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 +{"pluginName":"Eventbrite","pluginDescription":"Integration with Eventbrite API","pluginVersion":"1.0.9","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 4bb4ad5..a01d208 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.9 - 2023-06-22 +### Fixed +- issue where array_column() expects parameter 1 to be array, object given + ## 1.0.8 - 2023-05-09 ### Fixed - Fixed array null with $event diff --git a/composer.json b/composer.json index fd910af..ee34a6b 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.8", + "version": "1.0.9", "keywords": [ "craft", "cms", diff --git a/src/services/EventbriteEvents.php b/src/services/EventbriteEvents.php index 2699e3d..323c71a 100644 --- a/src/services/EventbriteEvents.php +++ b/src/services/EventbriteEvents.php @@ -141,8 +141,8 @@ public function getEvent($eventId, $expansions = null, $fullDescription = true, } $event = $this->curlWrap($method); - - $otherEventIds = array_column(json_decode(Eventbrite::$plugin->nonAdminSettings->get()->one()->otherEventIds), 0); + + $otherEventIds = array_column(json_decode(Eventbrite::$plugin->nonAdminSettings->get()->one()->otherEventIds, true), 0); if (is_array($event) && ($unlistedEvent === false && $event['listed'] === false) || ($event['organization_id'] != Eventbrite::$plugin->getSettings()->organisationId && !array_search($eventId, $otherEventIds))) { $event = null;