Skip to content

Deprecated Functionality: str_replace() with Magento 2.4.7-p2 and php 8.1 and 8.3 as required

I have a new installation of magento (haven’t gone live yet) and just upgraded to the latest 2.4.7-p2 version. I have followed all the system requirements and upgraded from php v8.1 to 8.3 as required by the magento system requirements.
When I was testing the checkout process I was presented with a server error and the following in the exception log.

I’ve seen other mention similar error but none with the original magento modules.
Did i miss something during the upgrade where it’s still using old depricated functions?

It seems this issue shouldn’t be happening with an install following the published system requirements. The admin is properly reporting the v. 2.4.7-p2 which leads me to believe the upgrade is complete.

Is this a common issue with this version?

[2024-09-16T12:22:44.976431+00:00] main.CRITICAL: Exception: Deprecated Functionality: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/magento2/vendor/magento/zend-db/library/Zend/Db/Adapter/Abstract.php on line 1044 in /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php:62