From 989bdc07b25528edf8b792d10b290ece0dd1b7b8 Mon Sep 17 00:00:00 2001 From: bencroker Date: Mon, 12 Aug 2024 10:17:37 +0200 Subject: [PATCH] Need to check enum value --- src/Campaign.php | 2 +- src/services/ReportsService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Campaign.php b/src/Campaign.php index fb41cebf..cefbe090 100644 --- a/src/Campaign.php +++ b/src/Campaign.php @@ -238,7 +238,7 @@ public function init(): void } // If Craft edition is at least Team - if (Craft::$app->edition >= CmsEdition::Team) { + if (Craft::$app->edition->value >= CmsEdition::Team->value) { $this->registerUserPermissions(); $this->sync->registerUserEvents(); } diff --git a/src/services/ReportsService.php b/src/services/ReportsService.php index 6bf6f20d..6fea3643 100755 --- a/src/services/ReportsService.php +++ b/src/services/ReportsService.php @@ -738,7 +738,7 @@ private function getActivity(array $models, string $interaction = null, int $lim $contactActivityModel->sourceUrl = UrlHelper::cpUrl('campaign/contacts/import/' . $model->source); break; case 'user': - $path = (Craft::$app->edition >= CmsEdition::Team && $model->source) ? 'users/' . $model->source : 'myaccount'; + $path = (Craft::$app->edition->value >= CmsEdition::Team->value && $model->source) ? 'users/' . $model->source : 'myaccount'; $contactActivityModel->sourceUrl = UrlHelper::cpUrl($path); break; default: