Folgenden Fehler habe ich bekommen
Code
The /e modifier is deprecated, use preg_replace_callback instead in /httpdocs/includes/classes/class.phpmailer.php on line 1247
habe dann folgendes geändert
Code
function EncodeQ($str, $position = 'text') {
/* There should not be any EOL in the string */
$encoded = preg_replace("[\r\n]", '', $str);
switch (strtolower($position)) {
case 'phrase':
$encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
break;
case 'comment':
$encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
case 'text':
default:
/* Replace every high ascii, control =, ? and _ characters */
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded);
break;
}
/* Replace every spaces to _ (more readable than =20) */
$encoded = str_replace(' ', '_', $encoded);
return $encoded;
}
Alles anzeigen
in
Code
function EncodeQ($str, $position = 'text') {
/* There should not be any EOL in the string */
$encoded = preg_replace("[\r\n]", '', $str);
switch (strtolower($position)) {
case 'phrase':
$encoded = preg_replace_callback('/([^A-Za-z0-9!*+\/ -])/',function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
break;
case 'comment':
$encoded = preg_replace_callback('/([\(\)\"])/',function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
case 'text':
default:
/* Replace every high ascii, control =, ? and _ characters */
$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);
break;
}
/* Replace every spaces to _ (more readable than =20) */
$encoded = str_replace(' ', '_', $encoded);
return $encoded;
}
Alles anzeigen
wer Lust hat kann ja mal testen
Gruß
08.02.2016 Korrektur