From 4aaf18587f774925c36891e0710b1ec6b51ebe15 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Tue, 7 Jan 2025 20:01:25 +0600 Subject: [PATCH] pkp/pkp-lib#10751 fixed context settings access issue --- .../components/forms/context/PKPRestrictBulkEmailsForm.php | 4 ++-- pages/admin/AdminHandler.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/components/forms/context/PKPRestrictBulkEmailsForm.php b/classes/components/forms/context/PKPRestrictBulkEmailsForm.php index 76e12276650..df7adcc594f 100644 --- a/classes/components/forms/context/PKPRestrictBulkEmailsForm.php +++ b/classes/components/forms/context/PKPRestrictBulkEmailsForm.php @@ -16,7 +16,7 @@ namespace PKP\components\forms\context; use APP\core\Application; -use Illuminate\Support\LazyCollection; +use Illuminate\Support\Collection; use PKP\components\forms\FieldOptions; use PKP\components\forms\FormComponent; @@ -31,7 +31,7 @@ class PKPRestrictBulkEmailsForm extends FormComponent * * @param string $action URL to submit the form to */ - public function __construct($action, $context, LazyCollection $userGroups) + public function __construct($action, $context, Collection $userGroups) { $this->action = $action; diff --git a/pages/admin/AdminHandler.php b/pages/admin/AdminHandler.php index 5755a08b863..66603b0cba6 100644 --- a/pages/admin/AdminHandler.php +++ b/pages/admin/AdminHandler.php @@ -323,7 +323,7 @@ public function wizard($args, $request) $bulkEmailsEnabled = in_array($context->getId(), (array) $request->getSite()->getData('enableBulkEmails')); if ($bulkEmailsEnabled) { - $userGroups = UserGroup::withContextIds([$context->getId()])->get()->toArray(); + $userGroups = UserGroup::withContextIds([$context->getId()])->get(); $restrictBulkEmailsForm = new \PKP\components\forms\context\PKPRestrictBulkEmailsForm($apiUrl, $context, $userGroups); $components[$restrictBulkEmailsForm->id] = $restrictBulkEmailsForm->getConfig();