Do not recognize broken symlinks (smaller than 32 bytes) as minified scripts

This commit is contained in:
Kijin Sung 2016-01-11 19:21:14 +09:00
parent e80332706a
commit 7850afdb63

View file

@ -183,7 +183,7 @@ class FrontEndFileHandler extends Handler
$originalFilePath = $file->fileRealPath . '/' . $pathInfo['basename'];
// Fix incorrectly minified URL
if($file->isMinified && !$file->isExternalURL && (!file_exists($originalFilePath) || is_link($originalFilePath)))
if($file->isMinified && !$file->isExternalURL && (!file_exists($originalFilePath) || is_link($originalFilePath) || filesize($originalFilePath) < 32))
{
if(file_exists($file->fileRealPath . '/' . $file->fileNameNoExt . '.' . $file->fileExtension))
{