Product import fails with fatal error #10372
Labels
Area:Import
Issues & PRs related to all things regarding Importing
Area: PHP8
Issues & PRs related to the CRM when using PHP8
Priority:Important
Issues & PRs that are important; broken functions, errors - there are workarounds
Severity: Moderate
Key function failed, but no or little impact
Status:Fix Proposed
A issue that has a PR related to it that provides a possible resolution
Type: Bug
Bugs within the core SuiteCRM codebase
Issue
When importing products via CSV file on a server running PHP 8.2 the following error is thrown when reaching the product prices within the import.
PHP Fatal error: Uncaught TypeError: mb_substr(): Argument #3 ($length) must be of type ?int, string given in /var/www/include/utils.php:5149
This is caused by the price vardefs which are in the format
26,4
with26
representing the overall length and4
representing the potential decimals.In PHP8.2 this throws a fatal error and prevents the import from completing.
Expected Behavior
The CSV import process should complete as expected.
Actual Behavior
The import fails with no errors displayed through the UI, just an empty warning box.
Possible Fix
Fix branch to follow
Steps to Reproduce
Context
Relatively high priority as it impacts users importing products
Your Environment
The text was updated successfully, but these errors were encountered: