Posted in:
Magento 2 Tutorials
Magento 2 function mcrypt_module_open() is deprecated
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.- mcrypt_module_open
- mcrypt_enc_get_key_size
- mcrypt_enc_get_iv_size
- mcrypt_module_close
- mcrypt_generic_init
- mcrypt_generic_deinit
- mcrypt_generic
- mdecrypt_generic
Below is one example.
$this->_handle = mcrypt_module_open($cipher, '', $mode, '');
Becomes
$this->_handle = @mcrypt_module_open($cipher, '', $mode, '');
December 4, 2018
Did you like this post?