Skip to content
Snippets Groups Projects
Commit fef6ede2 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#55910, fix warnings in file.inc, patch by chx.

parent a6d62c1b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment