Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Depreciated function in PHP 5.3
Pages: [1]   Go Down
  Print  
Author Topic: Depreciated function in PHP 5.3  (Read 1177 times)
0 Members and 1 Guest are viewing this topic.
charobnjak
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« on: April 19, 2010, 16:09:58 »

Hi all,

we just moved to our new server that runs on PHP 5.3

And the function eregi_replace isnt used any more

Thats line 688 in jcomments.class.php

   $text = eregi_replace($badwords[$i], $replaceWord, $text);

btw
love the component


Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: April 19, 2010, 17:13:32 »

Yes, in next version it already fixed. You could replace this line with:

Code: (php)
$word = trim($badWords[$i]);
if ($word != '') {
$word = str_replace('#', '\#', str_replace('\#', '#', $word));
$txt = trim(preg_replace('#'. $word.'#ism'. JCOMMENTS_PCRE_UTF8, $replaceWord, $text));
// make safe from dummy bad words list
if ($txt != '') {
$text = $txt;
}
}
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
charobnjak
Newbie
*

Karma: 0
Offline Offline

Posts: 3


« Reply #2 on: April 20, 2010, 05:32:57 »

I have downloaded the  newer version but i didnt se it fixed...

Thanks
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: April 20, 2010, 12:05:27 »

I have downloaded the  newer version but i didnt se it fixed...
The version I told isn't released yet (I hope at this week), you could apply patch I've provided here... Or if you want I can give you latest test build of upcoming JComments version.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Depreciated function in PHP 5.3
 
Jump to: