← Back to team overview

mahara-contributors team mailing list archive

[Bug 1844748] A change has been merged

 

Reviewed:  https://reviews.mahara.org/10365
Committed: https://git.mahara.org/mahara/mahara/commit/44cc873c4e6392d390f5d8ad33044af748a906b7
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 44cc873c4e6392d390f5d8ad33044af748a906b7
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Fri Sep 20 12:57:40 2019 +1200

Bug 1844748: Trying to get property of non-object on comment delete

To test - see bug report

Also should fix the error
DOMDocument::loadHTML(): Misplaced DOCTYPE declaration in Entity, line: 1

When deleting a comment on someone elses page

behatnotneeded

Change-Id: I5bdbcb239d0f8f887355238bf89eb04facc85420
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1844748

Title:
  Deleting a private comment problem

Status in Mahara:
  Fix Committed

Bug description:
  When you have the following set up:

  1) Have a group set up that you can submit pages to
  2) Create a page and submit it to that group
  3) View the page and leave a private comment on it
  4) Now delete the comment and refresh the page

  You see "Trying to get property of non-object" error similar to:
   
    Call stack (most recent first):
     * log_message("Trying to get property of non-object", 8, true, true, "/home/robertl/code/mahara-devel/mahara/htdocs/arte...", 803) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/errors.php:521
     * error(8, "Trying to get property of non-object", "/home/robertl/code/mahara-devel/mahara/htdocs/arte...", 803, array(size 15)) at /home/robertl/code/mahara-devel/mahara/htdocs/artefact/comment/lib.php:803
     * ArtefactTypeComment::build_html(object(stdClass), false) at /home/robertl/code/mahara-devel/mahara/htdocs/artefact/comment/lib.php:553
     * ArtefactTypeComment::get_comments(object(stdClass)) at /home/robertl/code/mahara-devel/mahara/htdocs/view/view.php:288

  This is because we fetch $lastcomment and try to access it's 'id'
  value - but that is only for public comments

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1844748/+subscriptions


References