PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated

More PHP 8.2 warnings. This one occurs when updating products.

[14-Jan-2026 07:44:47 America/Chicago] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /app/functions/fn.ultimate.php on line 1973

To fix, replace:
$existing_companies = explode(',', $product_sharing_info['product_existing_companies']);

with:
$existing_companies = explode(',', $product_sharing_info['product_existing_companies'] ?? '');

There are quite a few lines that need to be fixed in the file that I haven’t seen warnings from yet. I would attach my edited file but it won’t let me.

I also find it strange that these are appearing after a PHP version patch.

Thank you for your report.

Could you please provide me with additional details on how to reproduce this issue? From what I can see, it is more likely to be related to database inconsistency than to the code itself.

If I can remember correctly, this warning occurred when my daily cron ran to update product pricing and inventory.

It seems like this issue requires examination in your installation, since I currently cannot imagine a situation in which this problem would occur, provided that all data in the database is correct.

I have the standard version which means one company one store if that means anything. The code I provided stopped the warnings.

Thank you for the details.

I understand that these changes to the code might remove the warning log entries. However, I think that these changes alone might only mask the real problem in the database rather than fixing the code.

That’s why I need the steps on how to reproduce the issue, so I can forward it to the developers.