Closed (fixed)
Project:
ImageField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Aug 2008 at 21:10 UTC
Updated:
22 Aug 2008 at 16:45 UTC
The theme functions for several formatters throw warnings if passed an $element whose $item is null. This may seem like the caller is broken, but that is in fact quite possible when an imagefield is used as part of a View. (Views needs to be able to display a list of nodes that may or may not have images associated with them. I'm not actually sure how that interacts with the wacky reference usage that imagefield is doing, which I don't actually understand, but that's a separate issue.)
The attached patch just adds some sanity checking to the theme functions to return an empty string if there is no data to format.
| Comment | File | Size | Author |
|---|---|---|---|
| no-image.patch | 2.65 KB | Crell |
Comments
Comment #1
drewish commentedthanks, committed to HEAD.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.