diff --git a/app/BBCode/Parser.php b/app/BBCode/Parser.php index dd1ca9a..cf309af 100644 --- a/app/BBCode/Parser.php +++ b/app/BBCode/Parser.php @@ -68,6 +68,11 @@ class Parser // Parse all emoticons foreach ($emotes as $emote) { + if ($poster === null) { + // eventually check for hierarchies here + continue; + } + $image = "{$emote->emote_string}"; $icon = preg_quote($emote->emote_string, '#'); $text = preg_replace("#{$icon}#", $image, $text); diff --git a/app/BBCode/Tags/NamedQuote.php b/app/BBCode/Tags/NamedQuote.php index 51bed29..343ba2d 100644 --- a/app/BBCode/Tags/NamedQuote.php +++ b/app/BBCode/Tags/NamedQuote.php @@ -7,7 +7,6 @@ namespace Sakura\BBCode\Tags; use Sakura\BBCode\TagBase; -use Sakura\CurrentSession; use Sakura\Forum\Forum; use Sakura\Forum\Post; use Sakura\Perms\Forum as ForumPerms; diff --git a/app/Forum/Post.php b/app/Forum/Post.php index dec9e5c..b75d7ea 100644 --- a/app/Forum/Post.php +++ b/app/Forum/Post.php @@ -171,7 +171,7 @@ class Post 'post_time' => time(), 'post_subject' => $subject, 'post_text' => $text, - 'post_text_parsed' => BBParser::toHTML(htmlentities($text), $this->poster), + 'post_text_parsed' => BBParser::toHTML(htmlentities($text), $poster), ]); // Update the last post date