Problem/Motivation

I discovered a regression coming from #3306211: Deprecated function: trim(): Passing null is deprecated as of PHP 8. When the BooleanTarget receives a value that is not a string, it will automatically evaluate to FALSE.

This is problematic for example when the source value is the integer 1 and that one is mapped to "Published status". I noticed on a site that a lot of content got unpublished.

Steps to reproduce

Proposed resolution

Rework the BooleanTarget, make sure that several values get converted to a boolean. Add tests for several types of inputs.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork feeds-3324981

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MegaChriz created an issue. See original summary.

  • MegaChriz committed ff6ebc2 on 8.x-3.x
    Issue #3324981 by MegaChriz: BooleanTarget converts non-string values to...
megachriz’s picture

And merged this bugfix!

megachriz’s picture

Status: Active » Fixed
bwoods’s picture

Thanks for posting and fixing so quickly! I ran into this issue and originally thought I was receiving bad data and/or something had been broken in the configuration. I initially created a custom Tamper hack to temporarily fix, so I'm glad to see a better solution than that!

Status: Fixed » Closed (fixed)

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