Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83065 invoked from network); 15 Jul 2012 19:27:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2012 19:27:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:51842] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/DD-20866-DB913005 for ; Sun, 15 Jul 2012 15:27:57 -0400 Received: by obfk16 with SMTP id k16so9870977obf.29 for ; Sun, 15 Jul 2012 12:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ewgptnr+2/ZRDIc270oyyMwk9/PUzDhFv2cKA8rXWEk=; b=EaRVTBEhAMzppv2Ftlr48r8wIWij9LTlkae/ttR/KYSubdFuxwBndM7EQbZc95YOvV RJXjhzb5CB+iojTzYeG0IkgvuYM2Uib840+lf6ky61w57c9YnCgE1mTTbOVAQtnf+xmZ P714G0o91/aTcsPP+ymOQ6TjjlVgYcyux2ScTwbGBSshbflsYu9yl/PZ2NHXbpEkPqY5 w7hxtMufO8MAYN7UbRRyfnYs2I2sxndj6FTdoGP3avKmGuvr5OAFPJF79Xmv5MpQU5Vj YpzYctvEtKKBKptAB3dO+chU6lz05LZzHAOdxBr412bxmb/XOZ+gXaIjtpl6pIZJ+JP9 04pA== MIME-Version: 1.0 Received: by 10.50.216.202 with SMTP id os10mr3714801igc.17.1342380474697; Sun, 15 Jul 2012 12:27:54 -0700 (PDT) Received: by 10.231.223.67 with HTTP; Sun, 15 Jul 2012 12:27:54 -0700 (PDT) In-Reply-To: <50025BCE.1090409@sugarcrm.com> References: <50025BCE.1090409@sugarcrm.com> Date: Sun, 15 Jul 2012 21:27:54 +0200 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] bug #49510 From: pierre.php@gmail.com (Pierre Joye) hi! On Sun, Jul 15, 2012 at 7:57 AM, Stas Malyshev wrote: > Hi! > > We've got a bit of a discussion on bug #49510 in the comments. The > problem is this: filter_var('', FILTER_VALIDATE_BOOLEAN, array("flags" > => FILTER_NULL_ON_FAILURE)) returns "null" (i.e. failure) while docs say > boolean filter will return false on ''. I think we need to sync with the > docs. > The question is - should we apply it to 5.3/5.4? It is a behavior > change, even though current code behavior does not match documented > behavior. The question is more about the correctness of the doc, and to what I remember (I implemented that NULL on failure thing), the doc is wrong. And the null on failure was mainly implemented for this exact case (boolean validation). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org