Merge pull request #4464 from MrPetovan/develop

Fix PHP Warning: preg_replace(): Compilation failed in include/items
This commit is contained in:
Tobias Diekershoff 2018-02-16 11:05:36 +01:00 committed by GitHub
commit 9fa274ff2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
$body = $removedlink;
}
$url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
$removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
$removedlink = preg_replace("/\[url\=" . preg_quote($matches[1]) . "\](.*?)\[\/url\]/ism", '', $body);
if (($removedlink == "") || strstr($body, $removedlink)) {
$body = $removedlink;
}