Michael Wallner wrote:
Hi Roman Ivanov, you wrote:
Sorry, do not have time to simplify. This is how I do it:
function filterRequest($prototype, $action){
loadPrototype($prototype);
$vars = get_class_vars($prototype);
if ($vars['vigilant'] == FALSE) {
return $_REQUEST;
}
$filter = getFilter($prototype, $action);
if ($filter == NULL) {
return NULL;
}
if ($filter == TRUE) {
return $_REQUEST;
}
If this is the code you're using, it's useless. Anything after those
two statements is "unreachable code", i.e. you do no filtering at all.
Yeah, need to replace == with ===. Thanks.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php