Hello,
I really need help, i don't understand where the error stays, i'll post the part where the errors seems to be:
case 'USERNAME' :
$result = (string) $preg_replace( '/[x00-x1Fx7F<>"'%', '', $source );
break;
default :
// Check for static usage and assign $filter the proper variable
if (is_object($this) && get_class($this) == 'JFilterInput') {
$filter = $this;
} else {
$filter =& JFilterInput::getInstance();
}
// Are we dealing with an array?
if (is_array($source)) {
foreach ($source as $key => $value)
{
// filter element for XSS and other 'bad' code etc.
if (is_string($value)) {
$source[$key] = $filter->_remove($filter->_decode($value));
}
}
$result = $source;
} else {
// Or a string?
if (is_string($source) && !empty ($source)) {
// filter source for XSS and other 'bad' code etc.
$result = $filter->_remove($filter->_decode($source));
} else {
// Not an array or string.. return the passed parameter
$result = $source;
}
}
break;
}
return $result;
}
/**
* Function to determine if contents of an attribute is safe
*
* @static
* @param array $attrSubSet A 2 element array for attributes name,value
* @return boolean True if bad code is detected
* @since 1.5
*/
Thank you!