ApiEchoNotifications: Don't add wikis with no timestamp

This should prevent fatals in the sort-by-timestamp code
farther down, and also prevent incorrect output.

Bug: T139112
Change-Id: I6480b2e751594ba3392322f40e950f95ae702104
This commit is contained in:
Roan Kattouw 2016-07-01 21:17:29 +02:00
parent 984441f8d9
commit f62106f740

View file

@ -346,7 +346,7 @@ class ApiEchoNotifications extends ApiCrossWikiBase {
}
}
$wikis = array_keys( $countsByWiki );
$wikis = array_keys( $timestampsByWiki );
$count = array_sum( $countsByWiki );
$maxTimestamp = new MWTimestamp( max( $timestampsByWiki ) );
$timestampsByWiki = array_map( function ( $ts ) {