Why? - "Use of undefined constant FILTER_SANITIZE_STRING"

Hello all,

I’m getting this error:

Use of undefined constant FILTER_SANITIZE_STRING - assumed ’ FILTER_SANITIZE_STRING’

The php version is:
PHP Version 5.2.13

This is the filter information on my php info file. (not sure if it’s related).

filter
Input Validation and Filtering enabled
Revision $Revision: 293051 $

Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value

This is the line of code:


$this->_nicHandle = filter_var($nicHandle,*FILTER_SANITIZE_STRING);

What could it be?

Thanks in advance,
Márcio

Check your encoding. PHP sees something that is prefixing it.
Look closely at the first quote: ' FILTER_SANITIZE_STRING'

I don’t know why we see a star here. :s in the code there’s no such thing. :s

Remove the star


$this->_nicHandle = filter_var($nicHandle, FILTER_SANITIZE_STRING);

Does it work now?