Skip to content

Don't pass NULL to functions that take string inputs

JonGold requested to merge JonGold/dataprocessor:null-aliases into main

In PHP 8, if you have a data processor that's supposed to output a string, but the field is blank, you get this message in your log (once per record outputted, so a lot):

Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Civi\DataProcessor\FieldOutputHandler\AbstractSimpleFieldOutputHandler->formatField() (line 89 of /home/jon/local/arteffect/web/sites/all/civicrm-custom/extensions/dataprocessor/Civi/DataProcessor/FieldOutputHandler/AbstractSimpleFieldOutputHandler.php) 

This fixes it.

Merge request reports

Loading