Skip to content

Commit

Permalink
Ensure css and js files actually exist before trying to compress them…
Browse files Browse the repository at this point in the history
… - addresses t=3962
  • Loading branch information
emanuele45 committed Sep 6, 2016
1 parent 81e84ed commit cc006f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sources/SiteCombiner.class.php
Expand Up @@ -337,6 +337,11 @@ private function _combineFiles($type)
// Read in all the data so we can process
foreach ($this->_combine_files as $key => $file)
{
if (!file_exists($file['file']))
{
continue;
}

$tempfile = trim(file_get_contents($file['file']));
$tempfile = (substr($tempfile, -3) === '}()') ? $tempfile . ';' : $tempfile;
$this->_combine_files[$key]['content'] = $tempfile;
Expand Down

0 comments on commit cc006f6

Please sign in to comment.