Browse Source

Create the file even if it's in CLI

https://github.com/chamilo/chamilo-lms/commit/7a6691647c213b1b950b622de685710b2220a4a8
Julio Montoya 6 years ago
parent
commit
0683b23602
1 changed files with 1 additions and 3 deletions
  1. 1 3
      main/inc/global.inc.php

+ 1 - 3
main/inc/global.inc.php

@@ -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);