mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
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
This commit is contained in:
parent
7055f83fe0
commit
e57dbfc86b
|
@ -376,6 +376,7 @@ class ApiEchoNotifications extends ApiQueryBase {
|
||||||
$http = new MultiHttpClient( array() );
|
$http = new MultiHttpClient( array() );
|
||||||
$responses = $http->runMulti( $reqs );
|
$responses = $http->runMulti( $reqs );
|
||||||
|
|
||||||
|
$results = array();
|
||||||
foreach ( $responses as $wiki => $response ) {
|
foreach ( $responses as $wiki => $response ) {
|
||||||
$statusCode = $response['response']['code'];
|
$statusCode = $response['response']['code'];
|
||||||
if ( $statusCode >= 200 && $statusCode <= 299 ) {
|
if ( $statusCode >= 200 && $statusCode <= 299 ) {
|
||||||
|
|
Loading…
Reference in a new issue