Re: Re: results of the PHP6 wishlists

From: Date: Tue, 15 Nov 2005 14:18:09 +0000
Subject: Re: Re: results of the PHP6 wishlists
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-20002@lists.php.net to get a copy of this message
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.

« previous php.internals (#20002) next »