From f1abaa3269ebfd4fdd24aabb4b920d8aed285534 Mon Sep 17 00:00:00 2001 From: Glomberg Date: Thu, 26 Dec 2024 10:56:32 +0300 Subject: [PATCH] Fix. Forms decoration. Fatal error getting decoration fixed. --- lib/Cleantalk/ApbctWP/FormDecorator/FormDecorator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cleantalk/ApbctWP/FormDecorator/FormDecorator.php b/lib/Cleantalk/ApbctWP/FormDecorator/FormDecorator.php index 73bff645..776b025d 100644 --- a/lib/Cleantalk/ApbctWP/FormDecorator/FormDecorator.php +++ b/lib/Cleantalk/ApbctWP/FormDecorator/FormDecorator.php @@ -43,11 +43,11 @@ public function setDecorationSet($localized_set_name) global $apbct; $registered_name = $this->decoration_registry->getRegisteredNameByLocalizedName($localized_set_name); $this->decoration_set = $this->decoration_registry->getDecoration($registered_name); - $this->decoration_set->localizeCSS(); if (false === $this->decoration_set) { $this->addError(': ' . __('No decoration set registered with name', 'cleantalk-spam-protect') . '[' . esc_html($localized_set_name) . ']'); return; } + $this->decoration_set->localizeCSS(); $this->decoration_set->text = $apbct->settings['comments__form_decoration_text']; $this->decoration_set->color = !empty($apbct->settings['comments__form_decoration_color']) ? $apbct->settings['comments__form_decoration_color']