mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/11538] Fix incorrect regex and test for duplicate # in color string
PHPBB3-11538
This commit is contained in:
parent
a547ba3f9d
commit
1fae7720e4
2 changed files with 2 additions and 1 deletions
|
@ -597,7 +597,7 @@ class ucp_groups
|
||||||
|
|
||||||
if (!empty($submit_ary['colour']))
|
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))
|
if (sizeof($group_colour))
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_test_case
|
||||||
array('#a00', 'GROUP_UPDATED'),
|
array('#a00', 'GROUP_UPDATED'),
|
||||||
array('ag0', 'COLOUR_INVALID'),
|
array('ag0', 'COLOUR_INVALID'),
|
||||||
array('#ag0', 'COLOUR_INVALID'),
|
array('#ag0', 'COLOUR_INVALID'),
|
||||||
|
array('##bcc', 'COLOUR_INVALID'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue