diff --git a/file_entity.file.inc b/file_entity.file.inc index 6f50207..1d4703d 100644 --- a/file_entity.file.inc +++ b/file_entity.file.inc @@ -157,7 +157,7 @@ function file_entity_file_load($files) { function file_entity_image_dimensions($file, $force = FALSE) { // Prevent PHP notices when trying to read empty files. // @see http://drupal.org/node/681042 - if (!filesize($file->uri)) { + if (!$file->filesize) { return; } diff --git a/file_entity.module b/file_entity.module index 8d2e31c..25327d0 100644 --- a/file_entity.module +++ b/file_entity.module @@ -522,7 +522,7 @@ function file_entity_file_formatter_file_field_settings($form, &$form_state, $se function file_entity_file_formatter_file_image_view($file, $display, $langcode) { // Prevent PHP notices when trying to read empty files. // @see http://drupal.org/node/681042 - if (!filesize($file->uri)) { + if (!$file->filesize) { return; }