Error: fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
Additional info
In the file vendor\yiisoft\yii2\console\controllers\AssetController.php 518
call is used
$this->stdout(shell_exec(strtr($this->jsCompressor, [
'{from}' => escapeshellarg($tmpFile),
'{to}' => escapeshellarg($outputFile),
])));
shell_exec returns null for line in assets.php 'jsCompressor' => 'uglifyjs {from} -m -o {to}',
this throws an error Error: fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
What steps will reproduce the problem?
yii asset assets.php config/assets-prod.php
What is the expected result?
out js
What do you get instead?
Error: fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
Additional info
In the file vendor\yiisoft\yii2\console\controllers\AssetController.php 518 call is used $this->stdout(shell_exec(strtr($this->jsCompressor, [ '{from}' => escapeshellarg($tmpFile), '{to}' => escapeshellarg($outputFile), ]))); shell_exec returns null for line in assets.php 'jsCompressor' => 'uglifyjs {from} -m -o {to}', this throws an error Error: fwrite(): Passing null to parameter #2 ($data) of type string is deprecated