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.

CommentFileSizeAuthor
no-image.patch2.65 KBCrell

Comments

drewish’s picture

Status: Needs review » Fixed

thanks, committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.