Mattflaschen has uploaded a new change for review.

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

Change subject: Fix error in IRCLineUrlFormatter
......................................................................

Fix error in IRCLineUrlFormatter

Bug: T109537
Change-Id: Ie853f493ef2f24b48cf635f9e83c5aa2bce85338
(cherry picked from commit ce342e9ce9db1648259531621797a94eb7250a08)
---
M includes/Formatter/IRCLineUrlFormatter.php
1 file changed, 10 insertions(+), 0 deletions(-)


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

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/232414
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie853f493ef2f24b48cf635f9e83c5aa2bce85338
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf19
Gerrit-Owner: Mattflaschen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to