mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 18:30:06 +00:00
MentionInSummaryPresentationModel: Fix PHP error
RevisionRecord::getComment() can return null. When it does, accessing ->text on it fails. Bug: T226681 Change-Id: I069cd5d5bef51a3e2b8f4e7b50d478cf47f65e00
This commit is contained in:
parent
c2a61e22fc
commit
e6e7541531
|
@ -22,7 +22,7 @@ class EchoMentionInSummaryPresentationModel extends EchoEventPresentationModel {
|
|||
|
||||
public function getBodyMessage() {
|
||||
$revision = $this->event->getRevision();
|
||||
if ( $revision && $this->userCan( RevisionRecord::DELETED_COMMENT ) ) {
|
||||
if ( $revision && $revision->getComment() && $this->userCan( RevisionRecord::DELETED_COMMENT ) ) {
|
||||
$summary = $revision->getComment()->text;
|
||||
$summary = Linker::formatComment( $summary );
|
||||
$summary = Sanitizer::stripAllTags( $summary );
|
||||
|
|
Loading…
Reference in a new issue