The Field Boxes module currently returns a box to render without having actual content on some pages. It would be nice to allow it to return NULL or an empty array if it decides that it doesn't actually have anything to display. See the diff for details - basically a one liner that does display a box if the rendered box is empty
Or if you want to be fancy, define up a hasDisplay() method, but personally, I would just go with the !empty() approach.
While this is a feature request, it bypasses multiple errors if an empty value is returned.
Comments
Comment #1
alan d. commentedCross-posting to #1345568: Return nothing if there is no content in the Field Boxes queue. Please ping when fixed.
Cheers
Comment #2
Robin Millette commentedI used this smaller patch instead to achieve the same result.
Comment #3
muka commented#2 works, thank you
Comment #4
Robin Millette commentedMarking RTBC according to muka and it works for me.
Comment #5
hefox commentedPatch no longer applies but looks like the logic is already there so marking fixed