Home > Uncategorized > AMFPHP issue Function eregi_replace() is deprecated error

AMFPHP issue Function eregi_replace() is deprecated error

Hi folks,

amfphp 1.9 beta was released quite a long time, and recently i installed it to my localhost with newer php version but guess what, there was a function error stated eregi_replace() is deprecated error, now thanks to Renato Moya who adressed the problem on his blog the problem can now be fix by just replacing: the file in /amfphp/core/shared/utils

$comment = eregi_replace("\n[ \t]+", "\n", trim($comment));
$comment = str_replace("\n", "\\n", trim($comment));
$comment = eregi_replace("[\t ]+", " ", trim($comment));

with

$comment = preg_replace("`\n[ \t]+`U", "\n",trim($comment));
$comment = str_replace("\n", "\\n", trim($comment));
$comment = preg_replace("`[\t ]+`U", " ",trim($comment));

that’s all. hope this help who have the same problem.

Advertisement
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.