3404812-typeerror-implode-argument: updated the value being set in...
1 unresolved thread
3404812-typeerror-implode-argument: updated the value being set in #default_value to check if value exists before imploding it or else setting it to NULL
Closes #3404812
Merge request reports
Activity
added 1 commit
- 354fc955 - 3404812-typeerror-implode-argument: updating the way the value is being...
41 41 $form['not_found_exception_patterns'] = [ 42 42 '#type' => 'textarea', 43 43 '#title' => $this->t('Ban URL patterns'), 44 '#default_value' => implode("\n", $config->get('not_found_exception_patterns')), 44 '#default_value' => is_array($config->get('not_found_exception_patterns')) ? implode("\n", $config->get('not_found_exception_patterns')) : NULL, The field is required, so the form would not accept null here. The error happens when a value is given in code, or when the config key is deleted programmatically. This can also break the site if the module is not installed correctly (ex: using a config import). The NULL value is sane, but I wounder, if the config key has a string, would it be better if we show the string? if we don't show it, the site admin who saved a string using drush would think that his value was not saved.
Please register or sign in to reply