Bug #23278 Bug Fixed

When changing localization settings from forum cp, undefined index error is thrown.

Version: 4.0.4 Reporter: Bill the Grue

Hello all!

When changing localization settings on forum undefined index error is thrown. All other changes seem to work as expected.

To reproduce:

  1. spin up a clean 3.5.12 instance with forum addon.
  2. as a logged in member, from the following URI: MYSITE.FOO/forums/member/edit_localization
  3. try to make any changes and save.

The error is below:

Notice

Undefined index: site_default

ee/EllisLab/Addons/member/mod.member_settings.php, line 1643 hide details

Severity: E_NOTICE

the code block at line 1643:

foreach (array('timezone', 'date_format', 'time_format', 'include_seconts') as $key)
                {
                        if ($_POST['site_default'] == 'y')
                        {
                                $data[$key] = NULL;
                        }
                        else
                        {
                                $data[$key] = ee()->input->post($key);
                        }
                }

Robin note: Setting the seconds and the ‘use default’ aren’t sticking in my v4 tests. Not sure why the radio wouldn’t be set, but it makes sense to check for it in any case.

  • ee/EllisLab/Addons/member/mod.member_settings.php around line 1643

    if ($_POST['site_default'] == 'y')
    change to
     if (isset($_POST['site_default']) && $_POST['site_default'] == 'y')
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases