Skip to content

Commit 9a4b71a

Browse files
committed
updated json decode fix for issues/14
1 parent c4c1b0b commit 9a4b71a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Controller/Webhook/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function execute() {
111111
//$this->logger->info($rawData);
112112
if ($flag) {
113113
// @todo Process the $requestData as needed
114-
$requestData = json_decode($rawData);
114+
$requestData = json_decode($rawData, true);
115115
$changedData = isset($requestData["mautic.lead_channel_subscription_changed"]) ? $requestData["mautic.lead_channel_subscription_changed"] : [];
116116
//$oldStatus = isset($changedData['old_status']) ? $changedData['old_status']: "";//unsubscribed, contactable
117117
$newStatus = isset($changedData['new_status']) ? $changedData['new_status']: "";//contactable, unsubscribed

Ui/Component/Listing/Column/StageName.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function prepareDataSource(array $dataSource)
7878
$fieldName = $this->getData('name');
7979
foreach ($dataSource['data']['items'] as &$item) {
8080
if (isset($item['stage'])) {
81-
$stage = $item['stage'] ? json_decode($item['stage']): [];
81+
$stage = $item['stage'] ? json_decode($item['stage'], true): [];
8282
$item[$fieldName."_html"] = $stage ? "<strong>".$stage["name"].'</strong><br/><span class="small-text">'. __("(weight: %1)", $stage["weight"]).'</span>' : "";
8383
}
8484
}

Ui/Component/Listing/Column/TagsName.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function prepareDataSource(array $dataSource)
7878
$fieldName = $this->getData('name');
7979
foreach ($dataSource['data']['items'] as &$item) {
8080
if (isset($item['tags'])) {
81-
$tags = $item['tags'] ? json_decode($item['tags']): [];
81+
$tags = $item['tags'] ? json_decode($item['tags'], true): [];
8282
$newTags = [];
8383
foreach ($tags as $_tag) {
8484
$newTags[] = $_tag->tag;

0 commit comments

Comments
 (0)