Fix PHP Warning: preg_replace(): Compilation failed in include/items
This commit is contained in:
parent
753f92c234
commit
f4d76d10b2
|
@ -186,7 +186,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
|
$url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
|
||||||
$removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
|
$removedlink = preg_replace("/\[url\=" . preg_quote($url) . "\](.*?)\[\/url\]/ism", '', $body);
|
||||||
if (($removedlink == "") || strstr($body, $removedlink)) {
|
if (($removedlink == "") || strstr($body, $removedlink)) {
|
||||||
$body = $removedlink;
|
$body = $removedlink;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue