trim() function should not be called with null parameter.
Actual behavior
In src/DuplicatesIndex/DefaultMariaDbDuplicatesIndex.php, line 699 the trim() function gets called without ensuring that the value is not null. Before PHP8 this was not a problem, put in PHP8 this raises a deprecation warning:
<b>Deprecated</b>: trim(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/var/www/pimcore/vendor/pimcore/customer-management-framework-bundle/src/Dupl
icatesIndex/DefaultMariaDbDuplicatesIndex.php</b> on line <b>699</b><br />
If error_reporting is set to E_ALL, this will mess up the response sent to the client.
Steps to reproduce
Sorry, even though I was a PHP developer a long time ago, I'm not a regular Pimcore developer/user. While helping a customer, I found this error tainting a JSON response and decided to find out where it came from. I guess a prerequisite would be that at least one of the fields in the index must be null, but beyond that I don't have any more information.
Expected behavior
trim() function should not be called with null parameter.
Actual behavior
In src/DuplicatesIndex/DefaultMariaDbDuplicatesIndex.php, line 699 the trim() function gets called without ensuring that the value is not null. Before PHP8 this was not a problem, put in PHP8 this raises a deprecation warning:
If error_reporting is set to E_ALL, this will mess up the response sent to the client.
Steps to reproduce
Sorry, even though I was a PHP developer a long time ago, I'm not a regular Pimcore developer/user. While helping a customer, I found this error tainting a JSON response and decided to find out where it came from. I guess a prerequisite would be that at least one of the fields in the index must be null, but beyond that I don't have any more information.