PHP Warning: Invalid argument supplied for foreach()
#0 /srv/mediawiki/php-1.35.0-wmf.35/extensions/Echo/includes/api/ApiEchoMute.php(77): MWExceptionHandler::handleError(integer, string, string, integer, array) #1 /srv/mediawiki/php-1.35.0-wmf.35/extensions/Echo/includes/api/ApiEchoMute.php(44): ApiEchoMute->lookupIds(NULL, string) #2 /srv/mediawiki/php-1.35.0-wmf.35/includes/api/ApiMain.php(1584): ApiEchoMute->execute() #3 /srv/mediawiki/php-1.35.0-wmf.35/includes/api/ApiMain.php(524): ApiMain->executeAction() #4 /srv/mediawiki/php-1.35.0-wmf.35/includes/api/ApiMain.php(495): ApiMain->executeActionWithErrorHandling() #5 /srv/mediawiki/php-1.35.0-wmf.35/api.php(84): ApiMain->execute()
Impact
Unsure. To be determined.
Notes
The API code in question was recently introduced by https://gerrit.wikimedia.org/r/592806, which makes it likely a regression from that commit (/cc @Catrope, @Tgr).
The mute and unmute parameters are optional and without a default, which means they are provided by ApiBase as null, which is not a valid iterable value. Depending on whether absence of these is intentional or not, it is quite likely that it happens to behave correctly for end-users since an empty array and null would both lead to the same code execution. In any case, the error should be fixed, silenced, worked around to remove it from from production error logs, which can currently impact deployments and alerts.