#312677 by CorniI: Check to ensure a file exists when fixing installation file.
parent
4a0e68e838
commit
42dda57f96
|
@ -733,6 +733,11 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
|
|||
* TRUE/FALSE whether or not we were able to fix the file's permissions.
|
||||
*/
|
||||
function drupal_install_fix_file($file, $mask, $message = TRUE) {
|
||||
// If $file does not exist, fileperms() issues a PHP warning.
|
||||
if (!file_exists($file)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$mod = fileperms($file) & 0777;
|
||||
$masks = array(FILE_READABLE, FILE_WRITABLE, FILE_EXECUTABLE, FILE_NOT_READABLE, FILE_NOT_WRITABLE, FILE_NOT_EXECUTABLE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue