Skip to content
Snippets Groups Projects
Commit 9415477b authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #2918007: Fixed Install [warning] array_filter() expects parameter 1 to...

Issue #2918007: Fixed Install [warning] array_filter() expects parameter 1 to be array, string given ConfigureMultilingualForm.php:159
parent effc5333
No related branches found
No related tags found
No related merge requests found
......@@ -152,12 +152,27 @@ class ConfigureMultilingualForm extends FormBase {
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
// Get the value of enable multilingual checkbox.
$enable_multilingual = $form_state->getValue('enable_multilingual');
$GLOBALS['install_state']['varbase']['enable_multilingual'] = $enable_multilingual;
if (isset($enable_multilingual)
&& $enable_multilingual == TRUE) {
$GLOBALS['install_state']['varbase']['enable_multilingual'] = TRUE;
}
else {
$GLOBALS['install_state']['varbase']['enable_multilingual'] = FALSE;
}
// Get list of selected multilingual languages.
$multilingual_languages = $form_state->getValue('multilingual_languages');
$multilingual_languages = array_filter($multilingual_languages);
if (isset($multilingual_languages)
&& count($multilingual_languages) > 0) {
$multilingual_languages = array_filter($multilingual_languages);
}
else {
$multilingual_languages = [];
}
$GLOBALS['install_state']['varbase']['multilingual_languages'] = $multilingual_languages;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment