jenkins-bot has submitted this change and it was merged. 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(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Notifications/PostReplyPresentationModel.php b/includes/Notifications/PostReplyPresentationModel.php index 042d6d8..6b305c9 100644 --- a/includes/Notifications/PostReplyPresentationModel.php +++ b/includes/Notifications/PostReplyPresentationModel.php @@ -26,9 +26,9 @@ $notificationController = Container::get( 'controller.notification' ); $firstChronologicallyEvent = end( $bundledEvents ); $firstChronologicallyPostId = $firstChronologicallyEvent->getExtraParam( 'post-id' ); - $bundledEventsIncludingThis = array_merge( array( $this->event ), $bundledEvents ); - $topmostPostID = $notificationController->getTopmostPostId( $bundledEventsIncludingThis ); + $topmostPostID = $notificationController->getTopmostPostId( $bundledEventsIncludingThis ) ?: + $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: merged Gerrit-Change-Id: I6c544e174d101924333c4e7aa1af64068540de11 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits