From 599f83395f90c9a899b0e639ba5acacfb8ae372b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 11 Jul 2013 16:08:15 -0400 Subject: [ticket/11548] Run array_map on complete error array and not just colour_error Up to now the array_map() that turns error messages into the localized output was only ran if the group's color was set. With this patch it'll run the array_map() on the complete error array if it's not empty. PHPBB3-11548 --- phpBB/includes/ucp/ucp_groups.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 9365913541..663b5bc931 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -599,7 +599,7 @@ class ucp_groups if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour', true)))) { // Replace "error" string with its real, localised form - $error = array_merge($error, array_map(array(&$user, 'lang'), $colour_error)); + $error = array_merge($error, $colour_error); } if (!sizeof($error)) @@ -642,6 +642,7 @@ class ucp_groups if (sizeof($error)) { + $error = array_map(array(&$user, 'lang'), $error); $group_rank = $submit_ary['rank']; $group_desc_data = array( -- cgit v1.2.1