From e57dbfc86b11abae075e29f9cb3462eb02b31a63 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 5 May 2016 12:58:28 -0700 Subject: [PATCH] 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 --- includes/api/ApiEchoNotifications.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiEchoNotifications.php b/includes/api/ApiEchoNotifications.php index 1217105f1..1416a48b1 100644 --- a/includes/api/ApiEchoNotifications.php +++ b/includes/api/ApiEchoNotifications.php @@ -376,6 +376,7 @@ class ApiEchoNotifications extends ApiQueryBase { $http = new MultiHttpClient( array() ); $responses = $http->runMulti( $reqs ); + $results = array(); foreach ( $responses as $wiki => $response ) { $statusCode = $response['response']['code']; if ( $statusCode >= 200 && $statusCode <= 299 ) {