Actions
Bug #79269
closedCondition in ResourceCompressor::retrieveExternalFile makes no sense
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-01-11
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Hi!
Trying to compress and concatenate external assets leads to an error. This happens because condition in ResourceCompressor::retrieveExternalFile:637-648 makes no sense.
if (!file_exists(PATH_site . $filename) && (md5($externalContent) !== md5(file_get_contents(PATH_site . $filename))) ) { GeneralUtility::writeFile(PATH_site . $filename, $externalContent); }
It is not possible to "file_get_contents" a file that not exists.
May be the following is a better condition:
if (!file_exists(PATH_site . $filename) || (file_exists(PATH_site . $filename) && md5($externalContent) !== md5(file_get_contents(PATH_site . $filename)))) { GeneralUtility::writeFile(PATH_site . $filename, $externalContent); }
Files
Actions