mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/11538] Fix incorrect regex and test for duplicate # in color string
PHPBB3-11538
This commit is contained in:
parent
a547ba3f9d
commit
1fae7720e4
@ -597,7 +597,7 @@ class ucp_groups
|
||||
|
||||
if (!empty($submit_ary['colour']))
|
||||
{
|
||||
preg_match('/^(#?)+(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{3})\b/', $submit_ary['colour'], $group_colour);
|
||||
preg_match('/^#?(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{3})\b/', $submit_ary['colour'], $group_colour);
|
||||
|
||||
if (sizeof($group_colour))
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_test_case
|
||||
array('#a00', 'GROUP_UPDATED'),
|
||||
array('ag0', 'COLOUR_INVALID'),
|
||||
array('#ag0', 'COLOUR_INVALID'),
|
||||
array('##bcc', 'COLOUR_INVALID'),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user