summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew morton2008-07-25 01:52:19 (GMT)
committer andrew morton2008-07-25 01:52:19 (GMT)
commitc5ea02b0839516a11ee61fa215e65ba148abf5f2 (patch)
treee2a66475ca968b973d2fce43b684f77ac871507c
parent9cbdfdee654e4e4559c190474a295096b42146b3 (diff)
Avoid a fatal error if the filefield module is disabled after setting up imagecache as the formatter.
-rw-r--r--imagecache.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/imagecache.module b/imagecache.module
index 8f89778..6beb0e5 100644
--- a/imagecache.module
+++ b/imagecache.module
@@ -583,8 +583,8 @@ function imagecache_field_formatter($field, $item, $formatter, $node) {
$item = $field['default_image'];
}
// Views does not load the file for us, while CCK display fields does.
- if (empty($item['filepath'])) {
- $item = array_merge($item, field_file_load($item['fid']));
+ if (empty($item['filepath']) && module_exists('filefield')) {
+ $item = array_merge($item, field_file_load($item['fid']));
}
$parts = explode('_', $formatter);