Allow formatting post content without a request (#1848)

This commit is contained in:
Matteo Contrini 2019-09-04 00:12:28 +02:00 committed by Daniël Klabbers
parent 52e73b2481
commit df7f1291a7

View File

@ -167,7 +167,7 @@ class CommentPost extends Post
* @param ServerRequestInterface $request * @param ServerRequestInterface $request
* @return string * @return string
*/ */
public function formatContent(ServerRequestInterface $request) public function formatContent(ServerRequestInterface $request = null)
{ {
return static::$formatter->render($this->attributes['content'], $this, $request); return static::$formatter->render($this->attributes['content'], $this, $request);
} }