Commit 96feeef9 authored by Rebecca Blundell's avatar Rebecca Blundell
Browse files

Bug 1818591: Fix undefined index versioning error


Change-Id: I144b9763c393e8956d831b3169099b37d8fb4a0b
parent 1a08674a
......@@ -1083,6 +1083,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
require_once(get_config('docroot') . 'lib/view.php');
$view = new View($viewoptions['viewid']);
$artefact = artefact_instance_from_id($post->id);
if (!isset ($viewoptions['versioning'])) {
$viewoptions['versioning'] = false;
list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($artefact, $view, null, false, false, $viewoptions['versioning']);
$post->commentcount = $commentcount;
$post->comments = $comments;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment