mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 06:51:08 +02:00
[ticket/13713] Escape special characters in preg_replace
PHPBB3-13713
This commit is contained in:
@@ -124,7 +124,7 @@ abstract class base_group implements source_interface
|
|||||||
// Grab group data
|
// Grab group data
|
||||||
$groups = $this->get_groups();
|
$groups = $this->get_groups();
|
||||||
|
|
||||||
$matches = preg_grep('/^' . $keyword . '.*/i', $groups['names']);
|
$matches = preg_grep('/^' . preg_quote($keyword) . '.*/i', $groups['names']);
|
||||||
$group_ids = array_intersect($group_ids, array_flip($matches));
|
$group_ids = array_intersect($group_ids, array_flip($matches));
|
||||||
|
|
||||||
$names = [];
|
$names = [];
|
||||||
|
Reference in New Issue
Block a user