An error is frequently (0-9 times/day) occurring in logstash. It might be exposing a bug that we are not aware of, and is making it harder to see other bugs in our error logs so we should aim to investigate it and squash it!
Stack trace:
0 /srv/mediawiki/php-1.29.0-wmf.16/extensions/MobileFrontend/includes/api/ApiMobileView.php(129): MWExceptionHandler::handleError(integer, string, string, integer, array, array) #1 /srv/mediawiki/php-1.29.0-wmf.16/includes/api/ApiMain.php(1543): ApiMobileView->execute() #2 /srv/mediawiki/php-1.29.0-wmf.16/includes/api/ApiMain.php(544): ApiMain->executeAction() #3 /srv/mediawiki/php-1.29.0-wmf.16/includes/api/ApiMain.php(515): ApiMain->executeActionWithErrorHandling() #4 /srv/mediawiki/php-1.29.0-wmf.16/api.php(83): ApiMain->execute() #5 /srv/mediawiki/w/api.php(3): include(string) #6 {main}
Troublesome line appears to be:
$pageProps = array_intersect_key( $data['pageprops'], array_flip( $propNames ) );
Throwing
ErrorException from line 129 of /srv/mediawiki/php-1.29.0-wmf.21/extensions/MobileFrontend/includes/api/ApiMobileView.php: PHP Warning: array_intersect_key() expects parameter 1 to be an array or collection
Parameter 1 is $data['pageprops']
This will either be the result of ApiMobileView::getData which should be an empty list or the result of ParserOutput::getProperties
It's not clear why this is happening so additional logging may be required.
Spend no more than 3hrs on this. If you find yourself doing that, simply type check before calling array_intersect_key and add explicitly log the value of argument 1. Don't fall down the MediaWiki rabbit hole, trying to work out why.