Catrope has uploaded a new change for review.

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

Change subject: Follow-up 73ec3a331: fix fatal when no cross-wiki results are 
found
......................................................................

Follow-up 73ec3a331: fix fatal when no cross-wiki results are found

If we don't initialize $results, getForeignNotifications() will return
null, and this will cause a fatal when trying to += it into an array.

Change-Id: Ibb868cbf0b52ff2de41c5be82c9605801e51ffae
---
M includes/api/ApiEchoNotifications.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/40/287140/1

diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index 1217105..1416a48 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -376,6 +376,7 @@
                $http = new MultiHttpClient( array() );
                $responses = $http->runMulti( $reqs );
 
+               $results = array();
                foreach ( $responses as $wiki => $response ) {
                        $statusCode = $response['response']['code'];
                        if ( $statusCode >= 200 && $statusCode <= 299 ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb868cbf0b52ff2de41c5be82c9605801e51ffae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope <roan.katt...@gmail.com>

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

Reply via email to