The implementation of hook_field_is_empty() returns TRUE for string types where the value is the zero string. Any string should not be considered empty unless it's the empty string, "".

Comments

colan’s picture

Status: Active » Needs review
Issue tags: +D7 stable release blocker
StatusFileSize
new2.11 KB

Adding tag & patch.

colan’s picture

This fixes the assumption in #1349904: Don't render zero/null/error.

colan’s picture

Title: Zeroes in string types are assumed to be empty » Zeroes in string types are assumed to be empty (DB used for storage)
Issue summary: View changes
Related issues: +#1928178: Hide field when output is empty (and DB is not used for storage)

The corresponding issue for values not stored in the DB is #1928178: Hide field when output is empty (and DB is not used for storage).

  • colan committed db3afc0 on 7.x-1.x
    Issue #1440234 by colan: Don't assume non-empty strings are empty when...
colan’s picture

Component: Documentation » Code
Assigned: Unassigned » colan
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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