From cd1da92d8540d6b4aa0fa1ccf2bcafe68007288a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 19 May 2013 17:45:45 +0200 Subject: [ticket/11538] Add optional switch as argument to hex colour validation The value of $optional will decide whether an empty string will be treated as incorrect input or if it is allowed. The optional argument will default to false and therefore treat an empty string as incorrect unless explicitly told to not do so. PHPBB3-11538 --- phpBB/includes/ucp/ucp_groups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 20a55d8c32..9365913541 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -596,7 +596,7 @@ class ucp_groups } // Validate submitted colour value - if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour')))) + 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)); -- cgit v1.2.1