How To Minify Js With Php Jsmin Extension?

hi block.scripts.php have this code.

 if (function_exists('jsmin')) {
                $contents = jsmin($contents);
            } else {
                $contents = Minifier::minify($contents, array(
                    'flaggedComments' => false

i have installed php jsmin extension. but doesnt minify .js files need extra settings ?

also dev js false on config ?

Try replacing as follows to see what error it throws:

$contents = jsmin($contents);
$contents = jsmin($contents, $errors);

You will ofcourse need to access the errors variable, I suppose you should 'echo' it.

By the way, you can also get the last error by using the function 'jsmin_last_error'