aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-18 11:21:37 +0000
committerMario <mario@mariovavti.com>2021-01-18 11:21:37 +0000
commitfaaa2d447292e554f0498327a81016d215184abd (patch)
tree42fc76e92ec127ea703ea3a88a2f1ebc0ca13a85
parent917c6caa14e8b72a3e981b3940a8f56e9814647d (diff)
downloadvolse-hubzilla-faaa2d447292e554f0498327a81016d215184abd.tar.gz
volse-hubzilla-faaa2d447292e554f0498327a81016d215184abd.tar.bz2
volse-hubzilla-faaa2d447292e554f0498327a81016d215184abd.zip
$match should be array
-rw-r--r--include/bbcode.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index d79429719..e1a5c7e47 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -966,7 +966,7 @@ function bbtopoll($s) {
$pl['poll_id'] = $match[1];
$pl['poll_question'] = $match[2];
- $match = '';
+ $match = [];
if(preg_match_all("/\[poll\-answer=(.*?)\](.*?)\[\/poll\-answer\]/is",$s,$match,PREG_SET_ORDER)) {
$pl['answer'] = [];
foreach($match as $m) {
@@ -1349,7 +1349,7 @@ function bbcode($Text, $options = []) {
// Check for table of content with params
while(strpos($Text,'[toc') !== false) {
$toc_id = 'toc-' . random_string(10);
- $Text = preg_replace("/\[toc([^\]]+?)\]/ism", '<ul id="' . $toc_id . '" class="toc"$1></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1);
+ $Text = preg_replace("/\[toc([^\]]+?)\]/ism", '<ul id="' . $toc_id . '" class="toc" $1></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1);
}
// Check for centered text
if (strpos($Text,'[/center]') !== false) {