diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 07f7a3519d..4944f94c6d 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -74,13 +74,13 @@ class parse_message } $this->html($html); - if ($bbcode) + if ($bbcode && strpos($this->message, '[') !== FALSE) { $this->bbcode_init(); $disallow = array('allow_img', 'allow_flash', 'allow_quote'); foreach ($disallow as $bool) { - if (!$$bool) + if (!${$bool}) { $this->bbcodes[str_replace('allow_', '', $bool)]['disabled'] = TRUE; }