Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395169 )

Change subject: Don't attempt sending revision-visibility events if empty
......................................................................

Don't attempt sending revision-visibility events if empty

Change-Id: I63d0fc80c56532328ad59928ea04d482679a5c52
---
M EventBus.hooks.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventBus 
refs/changes/69/395169/1

diff --git a/EventBus.hooks.php b/EventBus.hooks.php
index 34e89ca..b3fdba6 100644
--- a/EventBus.hooks.php
+++ b/EventBus.hooks.php
@@ -393,6 +393,13 @@
                        }
                }
 
+               if ( empty( $events ) ) {
+                       // For revision-visibility-set it's possible that
+                       // the page was deleted simultaneously and we can not
+                       // send a meaningful event.
+                       return;
+               }
+
                DeferredUpdates::addCallableUpdate(
                        function () use ( $events ) {
                                EventBus::getInstance()->send( $events );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63d0fc80c56532328ad59928ea04d482679a5c52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppche...@wikimedia.org>

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

Reply via email to