mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11901] Pass empty string as relative_url for non-local magic URL.
Only the regular expression for MAGIC_URL_LOCAL has three capturing groups. As
a result $matches[3] is only set in this case. Prior to PHPBB3-11606 an empty
string was passed to make_clickable_callback() as a replacement in case of less
than three capturing groups. This patch reintroduces the empty string.
Regression from 49c12ef4be
.
PHPBB3-11901
This commit is contained in:
parent
1f7b0b4a46
commit
d024ba9b09
1 changed files with 2 additions and 1 deletions
|
@ -773,7 +773,8 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
|
|||
{
|
||||
$text = preg_replace_callback($magic_args[0], function($matches) use ($magic_args)
|
||||
{
|
||||
return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $matches[3], $magic_args[2]);
|
||||
$relative_url = isset($matches[3]) ? $matches[3] : '';
|
||||
return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $relative_url, $magic_args[2]);
|
||||
}, $text);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue