From 3b9caf5272b3fc4edb91e29e47b9d0ea47deb46f Mon Sep 17 00:00:00 2001 From: Bill Tomczak Date: Thu, 7 Dec 2023 14:10:09 -0800 Subject: [PATCH] Special handling for array parameters --- src/admin/library/MailingLists/AbstractClient.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/admin/library/MailingLists/AbstractClient.php b/src/admin/library/MailingLists/AbstractClient.php index a4ca5d8e..e074a906 100644 --- a/src/admin/library/MailingLists/AbstractClient.php +++ b/src/admin/library/MailingLists/AbstractClient.php @@ -182,17 +182,26 @@ protected function getDocumentParam(int $documentId, string $key, $default = nul { if ($document = $this->getDocument($documentId)) { $value = $document->get('params')->get($key); + if (is_array($value)) { + $value = array_filter($value); + } } if (empty($value)) { // Try category lookup if ($category = $this->getCategory($document->get('cate_id'))) { $value = $category->get('params')->get($key); + if (is_array($value)) { + $value = array_filter($value); + } } if (empty($value)) { // Try global $value = static::getParams()->get($key); + if (is_array($value)) { + $value = array_filter($value); + } } }