Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20002 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35454 invoked by uid 1010); 15 Nov 2005 15:28:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35437 invoked from network); 15 Nov 2005 15:28:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2005 15:28:11 -0000 X-Host-Fingerprint: 206.81.46.34 unknown Received: from ([206.81.46.34:11768] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id FC/82-07637-A8EF9734 for ; Tue, 15 Nov 2005 10:28:10 -0500 Message-ID: To: internals@lists.php.net Date: Tue, 15 Nov 2005 09:18:09 -0500 User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <84.9C.07637.EEB48734@pb1.pair.com> <6A.CC.07637.49C48734@pb1.pair.com> <437932CE.80000@zend.com> <4B.67.07637.41949734@pb1.pair.com> <4379AE54.1080808@zend.com> <8F.F8.07637.B9FD9734@pb1.pair.com> <4379E396.9070003@zend.com> <85.21.07637.059F9734@pb1.pair.com> In-Reply-To: <85.21.07637.059F9734@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 206.81.46.34 Subject: Re: [PHP-DEV] Re: results of the PHP6 wishlists From: gamblergluck@yahoo.com (Roman Ivanov) 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.