diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-05 23:10:48 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-05 23:10:48 +0000 |
commit | 80f691eeefeb4bcb22d2094334867a8ca9094916 (patch) | |
tree | c9a99d12ed34d3e655bb5045383f1dff33de0ca8 | |
parent | 8825e579e9c204b9ea1b4938e6b7059ce3d5f112 (diff) | |
download | brdo-80f691eeefeb4bcb22d2094334867a8ca9094916.tar.gz brdo-80f691eeefeb4bcb22d2094334867a8ca9094916.tar.bz2 |
#101164: Fix file upload in PHP5 (pass by reference)
-rw-r--r-- | modules/upload/upload.module | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 11358ae94..44596c186 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -377,7 +377,10 @@ function upload_form_alter($form_id, &$form) { // Make sure necessary directories for upload.module exist and are // writable before displaying the attachment form. - if (!file_check_directory(file_directory_path(), FILE_CREATE_DIRECTORY) || !file_check_directory(file_directory_temp(), FILE_CREATE_DIRECTORY)) { + $path = file_directory_path(); + $temp = file_directory_temp(); + // Note: pass by reference + if (!file_check_directory($path, FILE_CREATE_DIRECTORY) || !file_check_directory($temp, FILE_CREATE_DIRECTORY)) { $form['attachments']['#description'] = t('File attachments are disabled. The file directories have not been properly configured.'); if (user_access('administer site configuration')) { $form['attachments']['#description'] .= ' '. t('Please visit the <a href="@admin-file-system">file system configuration page</a>.', array('@admin-file-system' => url('admin/settings/file-system'))); |