Skip to content

Follow-up to #6987: Regression in contrib projects using text_field_is_empty() with only 2 params #7057

@indigoxela

Description

@indigoxela

Description of the bug

It turned out, that several modules rely on other module's hook_field_is_empty(). For example paragraphs and field_collection, which need to check fields attached to those entities.

The change happened in #6987 when invoking hook_field_is_empty(). There's also #7058 to deal with _field_filter_items().

Steps To Reproduce

... update to 1.33

Use a module which invokes hook_field_is_empty(). https://github.com/search?q=org%3Abackdrop-contrib+%27field_is_empty%27&type=code. For example, an older release of Paragraphs: module_invoke($field['module'], 'field_is_empty', $field_item, $field).

Actual behavior

Fatal errors under circumstances...

For example, the older release of Paragraphs (or Field Collection, etc) would check text_field_is_empty() which results in:

ArgumentCountError: Too few arguments to function text_field_is_empty()

Expected behavior

...

Additional information

Add any other information that could help, such as:

  • Backdrop CMS version: introduced with 1.33
  • Web server and its version:
  • PHP version:
  • Database sever (MySQL or MariaDB?) and its version:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions