Skip to content
Snippets Groups Projects
Commit 79d1945f authored by William Ranvaud's avatar William Ranvaud
Browse files

Issue #2992106 by Grabby, wranvaud: fix warning messages missing default...

Issue #2992106 by Grabby, wranvaud: fix warning messages missing default values when installing the module
parent 3af2fb18
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ function conditional_message_config_form($form, &$form_state) {
'#title' => t('Conditions'),
'#type' => 'checkboxes',
'#description' => t('Select the conditions in which the message will be displayed. Several conditions can be selected.'),
'#default_value' => variable_get('conditional_message_options'),
'#default_value' => variable_get('conditional_message_options', []),
'#required' => FALSE,
'#options' => $conditional_message_options,
'#attributes' => array('class' => array('conditional-message-options-columns')),
......@@ -148,7 +148,7 @@ function conditional_message_config_form($form, &$form_state) {
'#title' => t('User roles'),
'#description' => t('Select roles that will see the message'),
'#options' => user_roles(),
'#default_value' => variable_get('conditional_message_user_role'),
'#default_value' => variable_get('conditional_message_user_role', []),
'#required' => FALSE,
'#states' => array(
'visible' => array(
......@@ -209,7 +209,7 @@ function conditional_message_config_form($form, &$form_state) {
'#title' => t('Multi-sites'),
'#description' => t('Select the multi-sites that will see the message. The selected multi-sites must enable and configure the "Conditional Message Client" module'),
'#options' => conditional_message_multisites_list(),
'#default_value' => variable_get('conditional_message_multisite_client', NULL),
'#default_value' => variable_get('conditional_message_multisite_client', []),
'#required' => FALSE,
'#states' => array(
'visible' => array(
......@@ -290,7 +290,7 @@ function conditional_message_client_config_form_validate($form, &$form_state) {
if ($start == 'http:') {
$server_url = substr($server_url, 7);
}
else if ($start === 'https') {
elseif ($start === 'https') {
$server_url = substr($server_url, 8);
}
// Remove trailing slash if any.
......
......@@ -99,7 +99,8 @@ function conditional_message_data_output() {
$always = variable_get('conditional_message_always');
if ($always == 1) {
$data['always'] = TRUE;
} else {
}
else {
// Initializing variables for conditions configurations.
$data = array();
$options = variable_get('conditional_message_options');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment