Skip to content

Commit

Permalink
fixed issue - array_column expecting array, object given
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-adigital committed Jun 22, 2023
1 parent de170d8 commit 64f47bf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .craftplugin
Original file line number Diff line number Diff line change
@@ -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"}
{"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"}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/services/EventbriteEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 64f47bf

Please sign in to comment.