jenkins-bot has submitted this change and it was merged.
Change subject: Fix error in IRCLineUrlFormatter
......................................................................
Fix error in IRCLineUrlFormatter
Bug: T109537
Change-Id: Ie853f493ef2f24b48cf635f9e83c5aa2bce85338
---
M includes/Formatter/IRCLineUrlFormatter.php
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Formatter/IRCLineUrlFormatter.php
b/includes/Formatter/IRCLineUrlFormatter.php
index c4334e4..8cbce8b 100644
--- a/includes/Formatter/IRCLineUrlFormatter.php
+++ b/includes/Formatter/IRCLineUrlFormatter.php
@@ -58,6 +58,13 @@
}
/**
+ * Gets the formatted RC revision, or returns null if this revision is
not to be
+ * shown in RC, or on failure.
+ *
+ * @param RecentChange $rc
+ * @param IContextSource $ctx
+ * @return array|false Array of data, or false on failure
+ *
* @fixme this looks slow, likely a better way
*/
protected function serializeRcRevision( RecentChange $rc,
IContextSource $ctx ) {
@@ -65,6 +72,9 @@
$query = Container::get( 'query.changeslist' );
$query->loadMetadataBatch( array( (object)$rc->mAttribs ) );
$rcRow = $query->getResult( null, $rc );
+ if ( !$rcRow ) {
+ return false;
+ }
$this->serializer->setIncludeHistoryProperties( true );
return $this->serializer->formatApi( $rcRow, $ctx,
'recentchanges' );
--
To view, visit https://gerrit.wikimedia.org/r/232411
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie853f493ef2f24b48cf635f9e83c5aa2bce85338
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits