Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The attached one-line patch removes a bare function_exists()
from _field_filter_items()
that was missed in the clean-up patch at #497118-154: Remove the registry (for functions).
Comment | File | Size | Author |
---|---|---|---|
remove-function_exists-from-_field_filter_items.patch | 544 bytes | pillarsdotnet | |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedHistory of that line of code:
If we want to declare that hook_field_is_empty() is actually optional because there is a reasonable default behavior, that's fine too. I have no opinion about this particular function, yched is the one qualified to have an opinion on it.
I do note the following points:
1. hook_field_is_empty() does not seem to be documented in field.api.inc or http://api.drupal.org/api/group/field_types/7.
2. The Field Type API docs should specify explicitly which hooks are required and which are not.
Comment #2
sunAlready discovered in #977052: Implement hook_hook_info() for Field API hooks
Comment #3
chx CreditAttribution: chx commentedIf it's required, is it documented so?
Comment #4
pillarsdotnet CreditAttribution: pillarsdotnet commented@#3 by chx:
Apparently not, but that is a separate issue.
In fact, none of the hook implementations listed on the Field Types API page state whether they're required or optional.
As noted by bjaspan in #517430-7 (see history above):
This has not yet happened, and probably should be opened as a two-year-old documentation bug.
Comment #5
catchThanks! Committed and pushed to 8.x, moving back to 7.x.
Comment #6
webchickCommitted and pushed to 7.x. Thanks!
Comment #7.0
(not verified) CreditAttribution: commentedfixed the original issue link