diff options
author | Mario <mario@mariovavti.com> | 2022-09-07 12:50:46 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-09-07 12:50:46 +0000 |
commit | fcfb9e975836c4abbbfd339d46bf8ea937747e57 (patch) | |
tree | bbe6a8f19831eba6f9488c8e26687362870e0021 /include/bbcode.php | |
parent | 9beee689ce5537d0b64f20ccfe461eeb7c41ffa8 (diff) | |
download | volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.tar.gz volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.tar.bz2 volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.zip |
fix random php warnings
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 17 |
1 files changed, 11 insertions, 6 deletions
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 |