Open sweettbug3 opened 3 years ago
So I've setup my environment in PHP8.2 from 7.4 and I had sort of the same issue as you, blank screen while step 3 of importing a CSV. I had this error in my phplog : Uncaught TypeError: Cannot access offset of type string on string in /modules/Import/Forms.php:179 So Im not able to import a CSV file in PHP8.
If I go back to PHP 7.4 the process run smoothly, but in PHP8.2 not. (Assume that in php7 it was only throwing a warning ?)
I've put your fix and it fix the issue, I still need to check if the import go well, but changing that if() statement made the tricks for me.
Im on latest Suitecrm7 version : SuiteCRM 7.14.4
Importing a CSV file in opportunity module with some custom fields.
This issue is pretty much identical to #7869, but is found in modules/Import/Forms.php.
Issue
When importing into a module with options set to an empty string. I get a warning in my logs.
I checked and this is because $fieldlist[$name]['options'] is sometimes set to a string instead of an array.
Expected Behavior
No PHP warnings in the logs.
Actual Behavior
I get an illegal offset warning:
Possible Fix
Same fix as for #7869
Steps to Reproduce
Context
Creates a lot of annoying log messages.
Your Environment