mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Add missing isset() check to ApiEchoUnreadNotificationPages
…::getUnreadNotificationPagesFromForeign(). I'm not 100% sure if this fixes the code in a way it is supposed to work. However, I see that getFromForeign() is called 3 times in existing code, and 2 of these places already do an isset() check. It looks like it was just forgotten here. Even if there is another issue to fix here, this patch: a) silences the error, and b) gives us more useful debug output. Bug: T273479 Change-Id: I257620f646196c0554b9d86c849a02f5a8b9519c
This commit is contained in:
parent
5b032f5589
commit
d8a4b6ba91
|
@ -171,7 +171,9 @@ class ApiEchoUnreadNotificationPages extends ApiQueryBase {
|
||||||
protected function getUnreadNotificationPagesFromForeign() {
|
protected function getUnreadNotificationPagesFromForeign() {
|
||||||
$result = [];
|
$result = [];
|
||||||
foreach ( $this->getFromForeign() as $wiki => $data ) {
|
foreach ( $this->getFromForeign() as $wiki => $data ) {
|
||||||
$result[$wiki] = $data['query'][$this->getModuleName()][$wiki];
|
if ( isset( $data['query'][$this->getModuleName()][$wiki] ) ) {
|
||||||
|
$result[$wiki] = $data['query'][$this->getModuleName()][$wiki];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
Loading…
Reference in a new issue