civicrm/civicrm-core — pull request #1796 by pratik-joshi (2013-10-15 10:35:00+00:00)
Title: CRM-13591 : fixed condition check for display value returning function for custom fields (i.e used for returning appropriate val for Yes/No fields)

Now the following is achieved :
- If user selects 'Yes' option, profile view for this field displays 'Yes' value.
- If user selects 'No' option, profile view for this field displays 'No' value.
- If user selects neither 'Yes' nor 'No', profile view displays nothing (blank) .

Also checked for civicrm/profile/view display, the behavior is same as above.

The fix : Did typecasting to 'string' for equality check as : $value (i.e. 0 or 1) coming in the function as arg can be 'string' (in case of profile view page) or 'integer' (in case of event registration confirm page)