diff --git a/min/lib/Minify/FastClosureCompiler.php b/min/lib/Minify/FastClosureCompiler.php index 8897af8..5dd6cc7 100644 --- a/min/lib/Minify/FastClosureCompiler.php +++ b/min/lib/Minify/FastClosureCompiler.php @@ -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); }