Problem/Motivation
When new config split is created, warning is thrown. Problem is that array_walk executes callback with two parameters and strtolower is used as callback, where we have function that expects one parameter.
Proposed resolution
Possible solution is to wrap strtolower into callback function with two parameters expected.
Or simply change array_walk with foreach.
Warning Log
Warning: strtolower() expects exactly 1 parameter, 2 given in Drupal\config_split\Form\ConfigSplitEntityForm->filterConfigNames() (line 226 of modules/config_split/src/Form/ConfigSplitEntityForm.php).
Drupal\config_split\Form\ConfigSplitEntityForm->filterConfigNames(Array) (Line: 203)
Drupal\config_split\Form\ConfigSplitEntityForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 589)
Drupal\Core\Form\FormBuilder->processForm('config_split_add_form', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('config_split_add_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Comments
Comment #2
mtodor commentedHere is a solution with
foreach.Comment #3
mtodor commentedComment #5
bircherThanks for the contribution!