Sorry, I don't feel like typing a message dedicated to this fix I made. Let's just post the code.
Original code:
function idealcheckout_unserialize($sString) { // Recalculate multibyte strings $sString = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $sString); return unserialize($sString); } |
Error:
PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ... on line ..
This means idealcheckout_unserialize is not php7 compatible.
My fix:
// Unserialize data function idealcheckout_unserialize($sString) { // Recalculate multibyte strings $sString = preg_replace_callback('!s:(\d+):"(.*?)";!s', function($matches){ return 's:'.strlen($matches[2]).':"'.$matches[2].'";'; }, $sString); return unserialize($sString); } |