summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-26 15:02:51 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-26 15:02:51 +0000
commitfef6ede20be00703b1a7549a35712feff98bc52f (patch)
treed2ba8d246a7dd9644fc17d5d6664ca11430913d4 /includes
parenta6d62c1b62139e83cc6bcd6f13ab2821a668bd82 (diff)
downloadbrdo-fef6ede20be00703b1a7549a35712feff98bc52f.tar.gz
brdo-fef6ede20be00703b1a7549a35712feff98bc52f.tar.bz2
#55910, fix warnings in file.inc, patch by chx.
Diffstat (limited to 'includes')
-rw-r--r--includes/file.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 60d176892..eccdb2fc7 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -311,6 +311,7 @@ function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
// Make sure we at least have a valid directory.
if ($basename === false) {
+ $source = is_object($source) ? $source->filepath : $source;
drupal_set_message(t('The selected file %file could not be uploaded, because the destination %directory is not properly configured.', array('%file' => theme('placeholder', $source), '%directory' => theme('placeholder', $dest))), 'error');
watchdog('file system', t('The selected file %file could not not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.', array('%file' => theme('placeholder', $source), '%directory' => theme('placeholder', $dest))), WATCHDOG_ERROR);
return 0;
@@ -414,7 +415,7 @@ function file_move(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
if ($path_original == $path_current || file_delete($path_original)) {
return 1;
}
- drupal_set_message(t('The removal of the original file %file has failed.', array('%file' => theme('placeholder', $source))), 'error');
+ drupal_set_message(t('The removal of the original file %file has failed.', array('%file' => theme('placeholder', $path_original))), 'error');
}
return 0;
}