Commit 5d40e61e authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Robert Lyon
Browse files

Bug 1818591: Fix undefined index versioning error


Change-Id: I144b9763c393e8956d831b3169099b37d8fb4a0b
(cherry picked from commit 96feeef9)
parent bb240018
......@@ -1082,6 +1082,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