PHP 5.5 deprecated

Issue #7 new
Former user created an issue

file: system/log/error.txt

2014-04-05 23:40:29 - PHP Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/system/library/phpmailer/class.phpmailer.php on line 1862

Comments (1)

  1. mac

    Solution

    Replace lines 1861-1862

    $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord(stripslashes('\1')))", $encoded);

    With

    $encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/', function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);

  2. Log in to comment