Fixes warning "missing terminating ] for character class"
This commit is contained in:
parent
2d9719f9ff
commit
8d68e865c1
1 changed files with 2 additions and 1 deletions
|
@ -242,9 +242,10 @@ class BBCode extends BaseObject
|
||||||
// Simplify image codes
|
// Simplify image codes
|
||||||
$body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
|
$body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
|
||||||
|
|
||||||
|
$URLSearchString = "^\[\]";
|
||||||
|
|
||||||
$body = preg_replace("/\[img\=([$URLSearchString]*)\](.*?)\[\/img\]/ism", '[img]$1[/img]', $body);
|
$body = preg_replace("/\[img\=([$URLSearchString]*)\](.*?)\[\/img\]/ism", '[img]$1[/img]', $body);
|
||||||
|
|
||||||
$URLSearchString = "^\[\]";
|
|
||||||
if (preg_match_all("(\[url=([$URLSearchString]*)\]\s*\[img\]([$URLSearchString]*)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
|
if (preg_match_all("(\[url=([$URLSearchString]*)\]\s*\[img\]([$URLSearchString]*)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
|
||||||
if ((count($pictures) == 1) && !$has_title) {
|
if ((count($pictures) == 1) && !$has_title) {
|
||||||
// Checking, if the link goes to a picture
|
// Checking, if the link goes to a picture
|
||||||
|
|
Loading…
Reference in a new issue