Page MenuHomePhabricator

LocalFile::upload without a user fails in ::recordUpload3
Closed, ResolvedPublic

Description

Needs a fallback
Caused by yours truly, in rMWe834b31b2b5e: Use recordUpload3, hard deprecate recordUpload2

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 629772 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Adding handling for no user passed to LocalFile::upload

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

DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.
DannyS712 removed a project: Commons.

Noted it in failing tests for https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CognitiveProcessDesigner/+/629872

19:28:52 1) PDFFileResolverTest::testPDFFileResolver
19:28:52 TypeError: Argument 4 passed to LocalFile::recordUpload3() must be an instance of User, null given, called in /workspace/src/includes/filerepo/file/LocalFile.php on line 1434
19:28:52 
19:28:52 /workspace/src/includes/filerepo/file/LocalFile.php:1497
19:28:52 /workspace/src/includes/filerepo/file/LocalFile.php:1434
19:28:52 /workspace/src/extensions/BlueSpiceUEModulePDF/tests/phpunit/PDFFileResolverTest.php:62
19:28:52 /workspace/src/extensions/BlueSpiceUEModulePDF/tests/phpunit/PDFFileResolverTest.php:25
19:28:52 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
19:28:52 /workspace/src/maintenance/doMaintenance.php:107

Fix will need to be backported to 1.35

Sorry, its been a long day. Please forget what I said about backporting to 1.35 - this was caused well after 1.35 was initially cut

DannyS712 lowered the priority of this task from High to Medium.Sep 24 2020, 11:51 PM

Change 629772 merged by jenkins-bot:
[mediawiki/core@master] Adding handling for no user passed to LocalFile::upload

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

DannyS712 claimed this task.

Sorry, its been a long day. Please forget what I said about backporting to 1.35 - this was caused well after 1.35 was initially cut

There's always 1.35.1!

Sorry, its been a long day. Please forget what I said about backporting to 1.35 - this was caused well after 1.35 was initially cut

There's always 1.35.1!

No I mean the bug was caused by code that was introduced after the initial 1.35.0-rc.0 cut, and so doesn't need to be backported to 1.35 at all (and 1.35.0 hasn't been released yet)