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.
Pointed by moshe:
For better DX in hook_field_info_alter() et al, we should ensure that we provide at least empty arrays for 'settings' before calling drupal_alter().
Comment | File | Size | Author |
---|---|---|---|
#4 | field_settings_default.patch | 3.38 KB | yched |
#1 | field_settings_default.patch | 3.38 KB | yched |
field_settings_default.patch | 1.76 KB | yched | |
Comments
Comment #1
yched CreditAttribution: yched commentedAlso realized the sample code for the _alter() hooks is buggy.
Comment #3
yched CreditAttribution: yched commentedRequiring retest. The patch is really harmless, I don't see why it would break 'Enable / disable modules' tests.
Esp. if the original patch passed green. The second patch just adds changes to field.api.php
Interestingly, I get test those test failures when running this test locally on a vanilla HEAD... But the bot seems to return *some* green tests still...
Comment #4
yched CreditAttribution: yched commentedNo retest ? Reposting, then.
Comment #5
yched CreditAttribution: yched commentedThat's better.
Those test failures on HEAD look strange, though... I have 6 fails in 'Enable / disable modules' tests, locally 100% reproducible on a vanilla HEAD, and the bot (or at least some slaves) has them intermittently, it seems...
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedThanks yched. Very minor tidying up here.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. The MySQL database failed when I committed this so it might not be properly recorded. :/