Page MenuHomePhabricator

Error: Call to a member function getTitle() on array (in SpecialUpload.php)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.1
  • timestamp: 2025-11-11T13:30:30.904Z
  • labels.phpversion: 8.3.26
  • trace.id: 1b2b2385-e6af-44ca-a83a-046012d640da
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Error: Call to a member function getTitle() on array
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.1/includes/specials/SpecialUpload.php(1117)
#0/srv/mediawiki/php-1.46.0-wmf.1/includes/specials/SpecialUpload.php(648)MediaWiki\Specials\SpecialUpload::getExistsWarning(array)
#1/srv/mediawiki/php-1.46.0-wmf.1/includes/specials/SpecialUpload.php(339)MediaWiki\Specials\SpecialUpload->showUploadWarning(array)
#2/srv/mediawiki/php-1.46.0-wmf.1/includes/specials/SpecialUpload.php(279)MediaWiki\Specials\SpecialUpload->showUploadStatus(MediaWiki\User\User)
#3/srv/mediawiki/php-1.46.0-wmf.1/includes/SpecialPage/SpecialPage.php(711)MediaWiki\Specials\SpecialUpload->execute(null)
#4/srv/mediawiki/php-1.46.0-wmf.1/includes/SpecialPage/SpecialPageFactory.php(1736)MediaWiki\SpecialPage\SpecialPage->run(null)
#5/srv/mediawiki/php-1.46.0-wmf.1/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#6/srv/mediawiki/php-1.46.0-wmf.1/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#7/srv/mediawiki/php-1.46.0-wmf.1/includes/MediaWikiEntryPoint.php(184)MediaWiki\Actions\ActionEntryPoint->execute()
#8/srv/mediawiki/php-1.46.0-wmf.1/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#9/srv/mediawiki/w/index.php(3)require(string)
#10{main}
Impact
Notes

This is on old 1.46.0-wmf.1 but as the involved source code files have not been touched, I assume that this issue is unresolved.

Details

MediaWiki Version
1.46.0-wmf.1
Request URL
https://commons.wikimedia.org/wiki/Special:Upload
Related Changes in Gerrit:

Event Timeline

Umherirrender subscribed.

This is an async url upload ($wgEnableAsyncUploadsByURL = true is on commons and test/test2) from cfa7ed13b12025d76594972298ceb253b3f2047c

The array seems the serialized format for a file object of the internal status to cache the stage of the async upload.
I see no normal way to get this error.

But the code can fail with "Error: Call to a member function getTitle() on bool" as well, when the file is deleted between the async upload finish and the user refreshed the upload page.
So adding an check to avoid the error and show no warning.

Change #1204671 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Specials: Avoid error on async-url-upload on Special:Upload

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

Change #1204671 merged by jenkins-bot:

[mediawiki/core@master] Specials: Avoid error on async-url-upload on Special:Upload

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