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
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(