You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.
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.
The text was updated successfully, but these errors were encountered: