Tweaked AMFPHP for PHP 5.3 (eregi_replace issue)

View: New views
1 Messages — Rating Filter:   Alert me  

Tweaked AMFPHP for PHP 5.3 (eregi_replace issue)

by d.taylor :: Rate this Message:

| View Threaded | Show Only this Message

Hello All,
Just wanted to share that I just changed a couple lines in the core/shared/util/MethodTable.php

I was getting a php "Depreciated" alert for the eregi_replace function used there. so I modified it.. however I am not entirely sure that what I did is correct as I have very little experience with reg expressions.

I does work for me so that is why I am sharing it here:

I changed (around lines number 508-510):
$comment = eregi_replace("\n[ \t]+", "\n", trim($comment));
To:
$comment = preg_replace("\n[ \t]i", "\n", trim($comment));

it seems to work fine.