Jump to content

CrystalSeabolt

New Members
  • Posts

    5
  • Joined

  • Last visited

CrystalSeabolt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm trying to wrap my little head around replacing some deprecated preg_replaces and now I have this error... Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in /include/parse.php on line 150 Here is line 150.... $text = preg_replace_callback('#\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]#e', function ($matches) {return 'handle_img_tag(\'$1$3\')';}, $text); Can anyone show me the correct example?
  2. Thanks Ch0cu3r! I actually had one more instance of this line but it was a little different and I figured I would be able to figure it out with the new code from the line above... I WAS WRONG Would you be able to show me the fix for this last line? $text = preg_replace('#([\s\(\)])(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2://$3\')', $text); Your fix worked great.. but I am unable to apply it to this line.
  3. Not very good with PHP just HTML... this is the only error this old script has and that manual is alien to me.
  4. Hi guys I have an older script that I just rolled back out and I'm getting the following error.... preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead Below is my line of code and I'm failing at fixing this. $text = preg_replace('#([\s\(\)])(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2.$3\', \'$2.$3\')', $text); Any help would be greatly appreciated!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.