Issue Bug Closed

#46486ResourceCompressor: Cleanly handle/log non-existing files

Stefan Neufeind 03/21/13, 10:30 updated 10/28/15, 10:47

Description

Log-module in BE shows:

Core: Error handler (BE): PHP Warning: filesize() [function.filesize]: stat failed for /home/…/typo3conf/ext/gridelements/res/js/dbNewContentElWizardFixDTM.js in /home/…/typo3_src-6.0.4/typo3/sysext/core/Classes/Resource/ResourceCompressor.php line 304

Core: Error handler (BE): PHP Warning: filemtime() [function.filemtime]: stat failed for /home/…/typo3conf/ext/gridelements/res/js/dbNewContentElWizardFixDTM.js in /home/…/typo3_src-6.0.4/typo3/sysext/core/Classes/Resource/ResourceCompressor.php line 304

I checked that the file really does not exist here (which is an error in that checkout of gridelements). But we should handle such errors more gracefully / cleanly log them instead of throwing PHP warnings.

Steffen Ritter mentioned a similar case today, which I wasn’t able to reproduce but is the “same” error:
Core: Error handler (BE): PHP Warning: filesize(): stat failed for /var/www/typo3temp/sprites/zextensions.css in typo3/sysext/core/Classes/Resource/ResourceCompressor.php line 364

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.