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
|
@ -373,10 +373,12 @@ class OC_Files {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//supress errors in case we don't have permissions for it
|
//check for write permissions
|
||||||
if(@file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess)) {
|
if(is_writable(OC::$SERVERROOT.'/.htaccess')) {
|
||||||
|
file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess);
|
||||||
return OC_Helper::computerFileSize($size);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue