1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11535] Correctly merge avatar_errors array into primary error array

The $avatar_errors array needs to be merged into the primary $error array
before the group settings get applied. This is currently not the case.
Functional tests for this will be provided by PR #1401.

PHPBB3-11535
This commit is contained in:
Marc Alexander
2013-05-13 12:17:31 +02:00
parent bcf7ea3310
commit 6890bf9f8d
2 changed files with 16 additions and 4 deletions

View File

@@ -381,6 +381,9 @@ class acp_groups
$submit_ary['avatar_width'] = 0;
$submit_ary['avatar_height'] = 0;
}
// Merge any avatar errors into the primary error array
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
// Validate the length of "Maximum number of allowed recipients per private message" setting.
@@ -570,8 +573,11 @@ class acp_groups
$avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
// Merge any avatar errors into the primary error array
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
if (!$update)
{
// Merge any avatar errors into the primary error array
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
$back_link = request_var('back_link', '');