Page 1 of 1

[fixed] preg_replace(): The /e modifier is deprecated

Posted: Sun Jan 04, 2015 11:41 am
by jce76350
Hi,

1- On step 9 install PHAR rev 145 and SVN 9788 PHP 5.5.18
Message : Deprecated: preg_replace(): The /e modifier is deprecated ..lib/phpmailer/class.phpmailer.php
see

Code: Select all

	Line 1909:         $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
	Line 1912:         $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
And the class.phpmailer used on CMSms beta2 is the Version 5.2.1
so the last version PHPMailer 5.2.8

2- Other Deprecated: preg_replace()
html_entity_decode_utf8.php //replace numeric entities

Code: Select all

	Line 38: 	$string = preg_replace('~&#x0*([0-9a-f]+);~ei', '_code2utf8(hexdec("\\1"))', $string);
	Line 39: 	$string = preg_replace('~&#0*([0-9]+);~e', '_code2utf8(\\1)', $string);

Re: Deprecated: preg_replace(): The /e modifier is deprecate

Posted: Sun Jan 04, 2015 4:32 pm
by calguy1000
Fixed in svn.

Re: [fixed] preg_replace(): The /e modifier is deprecated

Posted: Sun Jan 04, 2015 7:47 pm
by jce76350
Ok solved in rev 9791 for PHPMailer 5.2.8

But error
Catchable fatal error: Object of class Closure could not be converted to string in \lib\html_entity_decode_utf8.php on line 42

Re: [open] preg_replace(): The /e modifier is deprecated

Posted: Mon Jan 05, 2015 8:35 am
by jce76350
Not solved in rev 9792 (html_entity_decode_utf8.php)

check in admin/listusertags.php?_sk_=xxxx

message :
Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in ...\lib\html_entity_decode_utf8.php on line 42

Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in ...\lib\html_entity_decode_utf8.php on line 46

Re: [open] preg_replace(): The /e modifier is deprecated

Posted: Mon Jan 05, 2015 3:20 pm
by jce76350
Yes solved in rev 9793