|
@@ -653,9 +653,7 @@ if (!file_exists($file) || api_get_setting('server_type') === 'test') {
|
|
|
// Force use of default to avoid problems
|
|
|
$tpl = 'default/layout/main.js.tpl';
|
|
|
$contents = $template->fetch($tpl);
|
|
|
- if (PHP_SAPI === 'cli') {
|
|
|
- // In CLI mode, the '.$file.' file does not get written on disk to avoid permissions issues.
|
|
|
- } elseif (!is_writable($file)) {
|
|
|
+ if (!is_writable($file)) {
|
|
|
error_log('Error: '.$file.' could not be written. Please check permissions. The web server must be able to write there.');
|
|
|
} else {
|
|
|
@file_put_contents($file, $contents);
|