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
I am using PHP 8.1 and receiving the following error when sending mail.
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Zend_Registry given in /var/www/ca/vendor/magento/zendframework1/library/Zend/Registry.php:207
For backward compatibility reasons, array_key_exists() will also return true if key is a property defined within an object given as array. This behaviour is deprecated as of PHP 7.4.0, and removed as of PHP 8.0.0.
Since the bit of code that is causing the TypeError was put into place to fix a previous bug, I have commented out the entire offsetExists() function in Registry.php so it would fall back to the function in ArrayObject.
Mail is now sending successfully with this function commented out.
The text was updated successfully, but these errors were encountered:
I am using PHP 8.1 and receiving the following error when sending mail.
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Zend_Registry given in /var/www/ca/vendor/magento/zendframework1/library/Zend/Registry.php:207
The way array_key_exists has changed in php 8
Since the bit of code that is causing the TypeError was put into place to fix a previous bug, I have commented out the entire
offsetExists()
function in Registry.php so it would fall back to the function in ArrayObject.Mail is now sending successfully with this function commented out.
The text was updated successfully, but these errors were encountered: