Noella94 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384199 )
Change subject: Invalid argument supplied for foreach all over MassMessageListContent ...................................................................... Invalid argument supplied for foreach all over MassMessageListContent Supplied empty instead of null array to foreach for cases where ->targets is null. Bug: T162734 Change-Id: I81c207eee36654b684ce52ccdb2df744210976e7 --- M includes/content/MassMessageListContent.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/99/384199/1 diff --git a/includes/content/MassMessageListContent.php b/includes/content/MassMessageListContent.php index b74f544..f4f6e42 100644 --- a/includes/content/MassMessageListContent.php +++ b/includes/content/MassMessageListContent.php @@ -64,11 +64,14 @@ } /** - * @return array|null + * @return array */ public function getTargets() { $this->decode(); - return $this->targets; + if ( is_array($this->targets) ) + return $this->targets; + else + return $arr = []; // empty array } /** -- To view, visit https://gerrit.wikimedia.org/r/384199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81c207eee36654b684ce52ccdb2df744210976e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Noella94 <tekenoell...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits