write a warning to the log file if .htaccess is not writable instead of failing silently
This commit is contained in:
parent
d71c4db10a
commit
061abb88b5
1 changed files with 6 additions and 4 deletions
|
@ -373,10 +373,12 @@ class OC_Files {
|
|||
}
|
||||
}
|
||||
|
||||
//supress errors in case we don't have permissions for it
|
||||
if(@file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess)) {
|
||||
return OC_Helper::computerFileSize($size);
|
||||
}
|
||||
//check for write permissions
|
||||
if(is_writable(OC::$SERVERROOT.'/.htaccess')) {
|
||||
file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess);
|
||||
return OC_Helper::computerFileSize($size);
|
||||
} else { OC_Log::write('files','Can\'t write upload limit to '.OC::$SERVERROOT.'/.htaccess. Please check the file permissions',OC_Log::WARN); }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue