Monday, 2 December 2019

Function mcrypt_module_open() is deprecated in Magento 2

Function mcrypt_module_open() is deprecated from PHP version 7.1. If you are using PHP 7.1 or higher for your Magento 2 website then you might face this error.
NOTE: This error is already solved by Magento in 2.2 and higher version.

Solution: Add @ sign before all below functions.

Below is one example.
$this->_handle = mcrypt_module_open($cipher, '', $mode, '');
Becomes
$this->_handle = @mcrypt_module_open($cipher, '', $mode, '');

No comments:

Post a Comment