form_set_error($form_field_name,t('File upload error. Could not move uploaded file.'));
watchdog('file','Upload error. Could not move uploaded file %file to destination %destination.',array('%file'=>$file->filename,'%destination'=>$file->uri));
$files[$i]=FALSE;
...
...
@@ -1234,14 +1234,14 @@ function file_save_upload($form_field_name, $validators = array(), $destination
}
// Set the permissions on the new file.
drupal_chmod($file->uri);
drupal_chmod($file->getFileUri());
// If we are replacing an existing file re-use its database record.
watchdog('file','File %file (%realpath) could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.',array('%file'=>$source->uri,'%realpath'=>$realpath,'%destination'=>$destination));
watchdog('file','File %file (%realpath) could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.',array('%file'=>$source->getFileUri(),'%realpath'=>$realpath,'%destination'=>$destination));
}
else{
watchdog('file','File %file could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.',array('%file'=>$source->uri,'%destination'=>$destination));
watchdog('file','File %file could not be copied because the destination %destination is invalid. This is often caused by improper use of file_copy() or a missing stream wrapper.',array('%file'=>$source->getFileUri(),'%destination'=>$destination));
}
drupal_set_message(t('The specified file %file could not be copied because the destination is invalid. More information is available in the system log.',array('%file'=>$source->uri)),'error');
drupal_set_message(t('The specified file %file could not be copied because the destination is invalid. More information is available in the system log.',array('%file'=>$source->getFileUri())),'error');
watchdog('file','File %file (%realpath) could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.',array('%file'=>$source->uri,'%realpath'=>$realpath,'%destination'=>$destination));
watchdog('file','File %file (%realpath) could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.',array('%file'=>$source->getFileUri(),'%realpath'=>$realpath,'%destination'=>$destination));
}
else{
watchdog('file','File %file could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.',array('%file'=>$source->uri,'%destination'=>$destination));
watchdog('file','File %file could not be moved because the destination %destination is invalid. This may be caused by improper use of file_move() or a missing stream wrapper.',array('%file'=>$source->getFileUri(),'%destination'=>$destination));
}
drupal_set_message(t('The specified file %file could not be moved because the destination is invalid. More information is available in the system log.',array('%file'=>$source->uri)),'error');
drupal_set_message(t('The specified file %file could not be moved because the destination is invalid. More information is available in the system log.',array('%file'=>$source->getFileUri())),'error');
$errors[]=t('The file is %filesize exceeding the maximum file size of %maxsize.',array('%filesize'=>format_size($file->filesize),'%maxsize'=>format_size($file_limit)));
if($file_limit&&$file->getSize()>$file_limit){
$errors[]=t('The file is %filesize exceeding the maximum file size of %maxsize.',array('%filesize'=>format_size($file->getSize()),'%maxsize'=>format_size($file_limit)));
}
// Save a query by only calling spaceUsed() when a limit is provided.
$errors[]=t('The file is %filesize which would exceed your disk quota of %quota.',array('%filesize'=>format_size($file->filesize),'%quota'=>format_size($user_limit)));
$errors[]=t('The file is %filesize which would exceed your disk quota of %quota.',array('%filesize'=>format_size($file->getSize()),'%quota'=>format_size($user_limit)));
watchdog('file system','Could not delete temporary file "%path" during garbage collection',array('%path'=>$file->uri),WATCHDOG_ERROR);
watchdog('file system','Could not delete temporary file "%path" during garbage collection',array('%path'=>$file->getFileUri()),WATCHDOG_ERROR);
}
}
else{
watchdog('file system','Did not delete temporary file "%path" during garbage collection because it is in use by the following modules: %modules.',array('%path'=>$file->uri,'%modules'=>implode(', ',array_keys($references))),WATCHDOG_INFO);
watchdog('file system','Did not delete temporary file "%path" during garbage collection because it is in use by the following modules: %modules.',array('%path'=>$file->getFileUri(),'%modules'=>implode(', ',array_keys($references))),WATCHDOG_INFO);