There is an issue on some hosting server with generating JS/CSS compressed files. This issue is related to recent improvement which adds ability to use JAVA Class to do a better compression.
The following code haven't full worked as expected on examined hosting server:
[code]
$command = 'java -jar ' . dirname(_FILE_) . DIRECTORY_SEPARATOR . 'yuicompressor-2.4.2.jar --type ' . $extension . ' --charset utf-8 ' . $tmp_file;
$compressed_string = shell_exec($command);
unlink($tmp_file);
if (!is_null($compressed_string))
{ $string = $compressed_string; return ; }[/code]
The solution is to add check if $compressed_string has any length.
- mentioned in
-
Page Loading...