What is this mess that you have here :-)
I don't have a clue! :) It looks allright here, when I press send.
How exactly are you calling the function when "no $max_length is passed"? If you're doing something like:
secure_string($string, '', 'error msg');
Just "secure_string($string);". In that case, $max_length should be set to -1 (since the function is defined function secure_string($unsafe_string, $max_length = -1, $errormessage = "Too many characters." ).
Or is this where I'm mistaken.
The thing is that I've tried with "zero", "null" and "0" as signals to the function that a max_length isn't applied. Nothing works.
But I've several functions with the same syntax, all working...
-- anders thoresson
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php