summaryrefslogtreecommitdiff
path: root/includes/install.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-27 20:03:35 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-27 20:03:35 +0000
commit42dda57f964f3e5936cfda941aecd21c51c99d7d (patch)
treedc3641c65abe854d9940ae002be9d4843c5609e2 /includes/install.inc
parent4a0e68e838bd44f431747116073cec1bd5b07ba0 (diff)
downloadbrdo-42dda57f964f3e5936cfda941aecd21c51c99d7d.tar.gz
brdo-42dda57f964f3e5936cfda941aecd21c51c99d7d.tar.bz2
#312677 by CorniI: Check to ensure a file exists when fixing installation file.
Diffstat (limited to 'includes/install.inc')
-rw-r--r--includes/install.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/install.inc b/includes/install.inc
index 047701480..9ff123267 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -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);