Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284524

Change subject: Topmost: Minor follow-up to add fallback for missing topmost 
post ID
......................................................................

Topmost: Minor follow-up to add fallback for missing topmost post ID

It shouldn't fail to calculate the topmost, but just in case, handle
this gracefully.

Bug: T126264
Change-Id: I6c544e174d101924333c4e7aa1af64068540de11
---
M includes/Notifications/PostReplyPresentationModel.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/24/284524/1

diff --git a/includes/Notifications/PostReplyPresentationModel.php 
b/includes/Notifications/PostReplyPresentationModel.php
index 4d160ad..ac300da 100644
--- a/includes/Notifications/PostReplyPresentationModel.php
+++ b/includes/Notifications/PostReplyPresentationModel.php
@@ -26,7 +26,8 @@
                        $notificationController = Container::get( 
'controller.notification' );
                        $firstChronologicallyEvent = end( $bundledEvents );
                        $firstChronologicallyPostId = 
$firstChronologicallyEvent->getExtraParam( 'post-id' );
-                       $topmostPostID = 
$notificationController->getTopmostPostId( $bundledEvents );
+                       $topmostPostID = 
$notificationController->getTopmostPostId( $bundledEvents ) ?:
+                               $firstChronologicallyPostId;
 
                } else {
                        $event = $this->event;

-- 
To view, visit https://gerrit.wikimedia.org/r/284524
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c544e174d101924333c4e7aa1af64068540de11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to