From fcfb9e975836c4abbbfd339d46bf8ea937747e57 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 7 Sep 2022 12:50:46 +0000 Subject: fix random php warnings --- include/bbcode.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 794cb25d0..100991afd 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -502,32 +502,37 @@ function bb_ShareAttributes($match) { $author = ""; preg_match("/author='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") + if (isset($matches[1]) && $matches[1] !== '') { $author = urldecode($matches[1]); + } $link = ""; preg_match("/link='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") + if (isset($matches[1]) && $matches[1] !== '') { $link = $matches[1]; + } $avatar = ""; preg_match("/avatar='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") + if (isset($matches[1]) && $matches[1] !== '') { $avatar = $matches[1]; + } $profile = ""; preg_match("/profile='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") + if (isset($matches[1]) && $matches[1] !== '') { $profile = $matches[1]; + } $posted = ""; preg_match("/posted='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") + if (isset($matches[1]) && $matches[1] !== '') { $posted = $matches[1]; + } $auth = ""; preg_match("/auth='(.*?)'/ism", $attributes, $matches); - if ($matches[1] != "") { + if (isset($matches[1]) && $matches[1] !== '') { if($matches[1] === 'true') $auth = true; else -- cgit v1.2.3