summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filefield_field.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/filefield_field.inc b/filefield_field.inc
index babc0d7..4779af6 100644
--- a/filefield_field.inc
+++ b/filefield_field.inc
@@ -169,6 +169,11 @@ function filefield_field_sanitize($node, $field, &$items, $teaser, $page) {
}
// Add nid so formatters can create a link to the node.
$items[$delta]['nid'] = $node->nid;
+
+ // Verify the file exists on the server.
+ if (!empty($item['filepath']) && !file_exists($item['filepath'])) {
+ watchdog('filefield', 'FileField was trying to display the file %file, but it does not exist.', array('%file' => $item['filepath']));
+ }
}
}