Aaron Schulz has submitted this change and it was merged. Change subject: Fix UploadStash::removeFile() error ......................................................................
Fix UploadStash::removeFile() error If nothing has called getFile() for a key before that key is passed to removeFileNoAuth(), UploadStash will throw a fatal error when it tries to remove the file from the filesystem because the UploadStashFile was never created. Change-Id: Idf0d2c53ce759b59836f34ff5aaad393b8c371c6 --- M includes/upload/UploadStash.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 65626cf..70debee 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -358,6 +358,9 @@ public function removeFileNoAuth( $key ) { wfDebug( __METHOD__ . " clearing row $key\n" ); + // Ensure we have the UploadStashFile loaded for this key + $this->getFile( $key ); + $dbw = $this->repo->getMasterDb(); $dbw->delete( -- To view, visit https://gerrit.wikimedia.org/r/51065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf0d2c53ce759b59836f34ff5aaad393b8c371c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits