Skip to content

Commit

Permalink
[BUGFIX] Initiate correct storage of processed file during reconstitu…
Browse files Browse the repository at this point in the history
…tion

Releases: master, 8.7
Resolves: #84069
Change-Id: Idd642770341ddd5513c650e5ae230bcb5e7e6824
Reviewed-on: https://review.typo3.org/55927
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
  • Loading branch information
fsaris authored and NeoBlack committed Feb 28, 2018
1 parent fff0d7a commit c5d57fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion typo3/sysext/core/Classes/Resource/ProcessedFile.php
Expand Up @@ -129,7 +129,6 @@ public function __construct(File $originalFile, $taskType, array $processingConf
* Creates a ProcessedFile object from a database record.
*
* @param array $databaseRow
* @return ProcessedFile
*/
protected function reconstituteFromDatabaseRecord(array $databaseRow)
{
Expand All @@ -140,6 +139,10 @@ protected function reconstituteFromDatabaseRecord(array $databaseRow)
$this->identifier = $databaseRow['identifier'];
$this->name = $databaseRow['name'];
$this->properties = $databaseRow;

if (!empty($databaseRow['storage']) && (int)$this->storage->getUid() !== (int)$databaseRow['storage']) {
$this->storage = ResourceFactory::getInstance()->getStorageObject($databaseRow['storage']);
}
}

/********************************
Expand Down

0 comments on commit c5d57fe

Please sign in to comment.