diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d98a5bf062..7d6f21fe5c 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -245,6 +245,7 @@ p a {
[Fix] Make sure that a folder is used when viewing messages to oneself (Bug #12105)
[Fix] Account for the fact that a board might have no visible Admins (Bug #12185)
[Fix] Change group ranks even if empty (Bug #12231)
+ [Fix] Correctly propagate variables across the custom profile field wizard (Bug #12237)
[Fix] Correctly move pm's into folders if more than one is received (Bug #12135)
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 2d4091f2f9..cfe982d9ae 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -449,8 +449,7 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen'
$var = sizeof(explode("\n", request_var('lang_options', '', true)));
}
-
- if ($field_type == FIELD_TEXT && $key == 'field_length')
+ else if ($field_type == FIELD_TEXT && $key == 'field_length')
{
if (isset($_REQUEST['rows']))
{
@@ -465,8 +464,7 @@ class acp_profile
$cp->vars['columns'] = $row_col[1];
}
}
-
- if ($field_type == FIELD_DATE && $key == 'field_default_value')
+ else if ($field_type == FIELD_DATE && $key == 'field_default_value')
{
$always_now = request_var('always_now', 0);
@@ -622,13 +620,20 @@ class acp_profile
foreach ($key_ary as $key)
{
- if (!isset($_REQUEST[$key]))
+ if (!isset($cp->vars[$key]))
{
- $var = false;
+ if (!isset($_REQUEST[$key]))
+ {
+ $var = false;
+ }
+ else
+ {
+ $_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? request_var($key, array(''), true) : request_var($key, '', true);
+ }
}
else
{
- $_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? request_var($key, array(''), true) : request_var($key, '', true);
+ $_new_key_ary[$key] = $cp->vars[$key];
}
}