FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » function index_text
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
function index_text [message #13487] Tue, 14 October 2003 14:06 Go to next message
ngockhoi is currently offline  ngockhoi   France
Messages: 15
Registered: July 2003
Location: Paris
Karma: 0
Junior Member
I must have the warning
Delimiter must not be alphanumeric or backslash

this is not a bug, but supposed to be a feature of php i think.
the delimiters
into the regexp. eg. "^$" becomes "/^$/"

function index_text($subj, $body, $msg_id)
....

$cs = array('/\W/', '/!\s+!/');
$cd = array(' ', ' ');

reverse_fmt($subj);
$subj = trim(preg_replace($cs, $cd, strip_tags(strtolower($subj))));
reverse_fmt($body);
$body = trim(preg_replace($cs, $cd, strip_tags(strtolower($body))));


Best regards,

Re: function index_text [message #13490 is a reply to message #13487] Tue, 14 October 2003 14:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You are wrong, ! is a valid delimiter, there is no reason to add the extra //. The warning you are seeing is likely the result of your custom replacments.

FUDforum Core Developer
Re: function index_text [message #13491 is a reply to message #13487] Tue, 14 October 2003 14:26 Go to previous messageGo to next message
ngockhoi is currently offline  ngockhoi   France
Messages: 15
Registered: July 2003
Location: Paris
Karma: 0
Junior Member
Yes i'm wrong for !\s+! but. Is true for \W ?

$cs = array('/\W/', '!\s+!');

work find with no warning.

Best regards
Re: function index_text [message #13493 is a reply to message #13491] Tue, 14 October 2003 14:46 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yup, in that case you are correct, the fix is already in the CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Forum Consistency Problem?
Next Topic: v2.5.3rc3 sluggish or doesn't respond
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 04 02:14:44 GMT 2024

Total time taken to generate the page: 0.04515 seconds