diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-10-10 21:01:15 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-10-10 21:01:15 +0200 |
commit | d024ba9b092843d5c933a2ac3b8b9d1c217be629 (patch) | |
tree | 1bdbfcb638309a3f8641636b0af45cb8e97bb42c /phpBB/includes/functions_content.php | |
parent | 1f7b0b4a46bda8d297e6e0377dca2c9fc265f8ab (diff) | |
download | forums-d024ba9b092843d5c933a2ac3b8b9d1c217be629.tar forums-d024ba9b092843d5c933a2ac3b8b9d1c217be629.tar.gz forums-d024ba9b092843d5c933a2ac3b8b9d1c217be629.tar.bz2 forums-d024ba9b092843d5c933a2ac3b8b9d1c217be629.tar.xz forums-d024ba9b092843d5c933a2ac3b8b9d1c217be629.zip |
[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 49c12ef4be229bf2223139298766ef441b075fbc.
PHPBB3-11901
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r-- | phpBB/includes/functions_content.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 863450a4b2..c5347ef262 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -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); } } |