From faaa2d447292e554f0498327a81016d215184abd Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 18 Jan 2021 11:21:37 +0000 Subject: $match should be array --- include/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/bbcode.php') 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", '', $Text, 1); + $Text = preg_replace("/\[toc([^\]]+?)\]/ism", '', $Text, 1); } // Check for centered text if (strpos($Text,'[/center]') !== false) { -- cgit v1.2.3