mirror of
https://github.com/mrclay/minify.git
synced 2025-08-29 08:40:11 +02:00
Fix error code candling, allow ALL options
This commit is contained in:
@@ -68,8 +68,9 @@ class Minify_FastClosureCompiler {
|
||||
// broke the connection and returns 227 instead of 0
|
||||
// We'll just handle this here instead of fixing
|
||||
// the nailgun client itself.
|
||||
if ($result_code != 0 || $result_code != 227) {
|
||||
if ($result_code != 0 && $result_code != 227) {
|
||||
throw new Exception('Minify_FastClosureCompiler : Closure Compiler execution failed.');
|
||||
|
||||
}
|
||||
return implode("\n", $output);
|
||||
}
|
||||
@@ -88,10 +89,8 @@ class Minify_FastClosureCompiler {
|
||||
? " --charset {$o['charset']}"
|
||||
: '');
|
||||
|
||||
foreach (array('compilation_level') as $opt) {
|
||||
if ($o[$opt]) {
|
||||
$cmd .= " --{$opt} ". escapeshellarg($o[$opt]);
|
||||
}
|
||||
foreach ($o as $key => $value) {
|
||||
$cmd .= " --{$key} ". escapeshellarg($value);
|
||||
}
|
||||
return $cmd . ' ' . escapeshellarg($tmpFile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user