v4.3's smtp email function is broken

jasonPaddy

New Member
YetiShare User
Jan 21, 2016
15
0
0
===========================================================
2016-04-03 09:09:28 - *** ERROR *** Array
(
[Error Msg] => Uncaught Error: Call to undefined function eregi_replace() in /............/core/includes/coreFunctions.class.php:642
Stack trace:
#0 /................../themes/flow/templates/register.html(180): coreFunctions::sendHtmlEmail(Array, 'Account details...', '<html>\n <hea...', 'xxxxxxx..')
#1 /..................../index.php(23): require_once('/..........................')
#2 {main}
thrown
[File] => /....../core/includes/coreFunctions.class.php
[Line Number] => 642
[Error Type] => E_ERROR
)

apparently php7 removed eregi_replace() function which is still in use by v4.3
 

enricodias4654

Member
YetiShare User
Jan 13, 2015
411
1
16
eregi_replace was deprecated for a long time and it was removed from php7. Replace it with preg_replace.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Thanks for pointing this out. I've fixed it within the release code and it'll be noted in the v4.3.1 release.

To patch it in, within:

Code:
/core/includes/coreFunctions.class.php
Search for:

Code:
$body  = eregi_replace("[\]", '', $body);
Replace with entire line with:

Code:
$body  = preg_replace("/[\\\]/", '', $body);