Page MenuHomePhabricator

PHP Warning: count(): Parameter must be an array or an object that implements Countable in WikibaseMediaInfo
Closed, ResolvedPublic

Description

Error

MediaWiki version: 1.35.0-wmf.5

message
PHP Warning: count(): Parameter must be an array or an object that implements Countable

Notes

121 instances in last 24 hours.

Details

Request ID
XdwegQpAAEkAAH0U3L8AAADV
Request URL
https://commons.wikimedia.org/w/api.php?action=opensearch&format=json&formatversion=2&search=m-1&namespace=0%7C6%7C12%7C14%7C100%7C106&limit=10&suggest=true
Stack Trace
exception.trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.35.0-wmf.5/extensions/WikibaseMediaInfo/src/Services/MediaInfoPrefetchingTermLookup.php(102): count(NULL)
#2 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(53): Wikibase\MediaInfo\Services\MediaInfoPrefetchingTermLookup->prefetchTerms(array, array, array)
#3 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(53): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->prefetchTerms(array, array, array)
#4 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(53): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->prefetchTerms(array, array, array)
#5 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(89): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->prefetchTerms(array, array, array)
#6 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/lib/includes/Store/EntityTermLookupBase.php(52): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->getTermsOfType(Wikibase\MediaInfo\DataModel\MediaInfoId, string, array)
#7 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/lib/includes/Store/LanguageFallbackLabelDescriptionLookup.php(47): Wikibase\Lib\Store\EntityTermLookupBase->getLabels(Wikibase\MediaInfo\DataModel\MediaInfoId, array)
#8 /srv/mediawiki/php-1.35.0-wmf.5/extensions/WikibaseCirrusSearch/src/Hooks.php(348): Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup->getLabel(Wikibase\MediaInfo\DataModel\MediaInfoId)
#9 /srv/mediawiki/php-1.35.0-wmf.5/extensions/WikibaseCirrusSearch/src/Hooks.php(369): Wikibase\Search\Elastic\Hooks::amendSearchResults(Wikibase\Repo\WikibaseRepo, LanguageEn, array)
#10 /srv/mediawiki/php-1.35.0-wmf.5/includes/Hooks.php(174): Wikibase\Search\Elastic\Hooks::onApiOpenSearchSuggest(array)
#11 /srv/mediawiki/php-1.35.0-wmf.5/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#12 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiOpenSearch.php(95): Hooks::run(string, array)
#13 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiMain.php(1603): ApiOpenSearch->execute()
#14 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiMain.php(539): ApiMain->executeAction()
#15 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiMain.php(510): ApiMain->executeActionWithErrorHandling()
#16 /srv/mediawiki/php-1.35.0-wmf.5/api.php(83): ApiMain->execute()
#17 /srv/mediawiki/w/api.php(3): require(string)
#18 {main}
Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterRemove problematic count() in MediaInfoPrefetchingTermLookup

Event Timeline

brennen created this task.Nov 25 2019, 8:35 PM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptNov 25 2019, 8:35 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
brennen renamed this task from PHP Warning: count(): Parameter must be an array or an object that implements Countable to PHP Warning: count(): Parameter must be an array or an object that implements Countable in WikibaseMediaInfo.Nov 25 2019, 8:37 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptNov 25 2019, 8:37 PM

Change 553041 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/WikibaseMediaInfo@master] Remove problematic count() in MediaInfoPrefetchingTermLookup

https://gerrit.wikimedia.org/r/553041

Change 553041 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Remove problematic count() in MediaInfoPrefetchingTermLookup

https://gerrit.wikimedia.org/r/553041

@brennen is this ok now?

matthiasmullie closed this task as Resolved.Dec 17 2019, 5:27 PM
matthiasmullie claimed this task.
matthiasmullie added a subscriber: matthiasmullie.

No longer present in recent error logs.