craft-linkfield icon indicating copy to clipboard operation
craft-linkfield copied to clipboard

Error with str_contains in PHP 8.2

Open MoritzLost opened this issue 2 years ago • 1 comments

We're getting this error in some console commands that interact with entries in some way:

str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in vendor/sebastianlenz/craft-utils/src/foreignField/ForeignFieldQueryExtension.php on line 264.

Not sure what's causing this exactly. I only see this error in some console commands, haven't seen it in a web request yet. Maybe it's an edge case that only occurs rarely, but can be handled in the craft-utils library?

MoritzLost avatar May 10 '23 13:05 MoritzLost

@sebastian-lenz Can you take a look at this? We're still seeing this issue.

MoritzLost avatar Jun 19 '23 08:06 MoritzLost