jenkins-bot has submitted this change and it was merged.

Change subject: Dont insert serialized Message objects into recentchanges
......................................................................


Dont insert serialized Message objects into recentchanges

Change-Id: I4f6462fafc7d5639b3a092fbf7aeafd6b061d51d
---
M includes/Data/RecentChanges.php
1 file changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Werdna: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Data/RecentChanges.php b/includes/Data/RecentChanges.php
index 8b62cef..bbb2049 100644
--- a/includes/Data/RecentChanges.php
+++ b/includes/Data/RecentChanges.php
@@ -151,9 +151,12 @@
                        return null;
                }
 
-               return $this->contLang->truncate(
-                       reset( $found )->getContent( null, 'wikitext' ),
-                       self::TRUNCATE_LENGTH
-               );
+               $content = reset( $found )->getContent( null, 'wikitext' );
+               if ( is_object( $content ) ) {
+                       // moderated
+                       return null;
+               }
+
+               return $this->contLang->truncate( $content, 
self::TRUNCATE_LENGTH );
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f6462fafc7d5639b3a092fbf7aeafd6b061d51d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to