From 21eae60f1a8b937d7dca840781375c5188a4c501 Mon Sep 17 00:00:00 2001 From: Vladimir Roudakov <44088-VladimirAus@users.noreply.drupalcode.org> Date: Mon, 20 Feb 2023 23:44:57 +1000 Subject: [PATCH] Issue #3343165: TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 545 of core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php) --- src/Service/BlockClassHelperService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/BlockClassHelperService.php b/src/Service/BlockClassHelperService.php index 479bdce..f008467 100644 --- a/src/Service/BlockClassHelperService.php +++ b/src/Service/BlockClassHelperService.php @@ -932,7 +932,7 @@ class BlockClassHelperService { public function validateDynamicClasses(&$form, &$form_state, $config) { // Get the ThirdPartySettings. - $third_party_settings = $form_state->getValue('class')['third_party_settings']; + $third_party_settings = $form_state->getValue('class') ? $form_state->getValue('class')['third_party_settings'] : []; // Verify if there is attributes enabled. if (!empty($form_state->getValue('attributes')['third_party_settings'])) { -- GitLab