This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  phpbugs.20....@spamgourmet.com
    SMTP error from remote mail server after RCPT 
TO:<phpbugs.20....@spamgourmet.com>:
    host mx-ha02.web.de [217.72.192.188]: 550 <phpbugs.20....@spamgourmet.com> 
Benutzer nicht bekannt/User unknown

------ This is a copy of the message, including all the headers. ------

Return-path:  phpbugs.20....@spamgourmet.com
Received: from spamgourmet by gourmet7.spamgourmet.com with local (Exim 4.69)
        (envelope-from <>)
        id 1S21j4-00044D-Os
        for phpbugs.20....@spamgourmet.com; Mon, 27 Feb 2012 14:38:54 +0000
Received: from 133.69-195-199.static.servergrove.com ([69.195.199.133] 
helo=sgrv2.php.net)
        by gourmet7.spamgourmet.com with esmtp (Exim 4.69)
        (envelope-from <nore...@php.net>)
        id 1S21j4-00043S-DZ
        for phpbugs.20....@spamgourmet.com; Mon, 27 Feb 2012 14:38:54 +0000
Received: from www-data by sgrv2.php.net with local (Exim 4.71)
        (envelope-from <nore...@php.net>)
        id 1S21iw-0003Lo-Of
        for phpbugs.20....@spamgourmet.com; Mon, 27 Feb 2012 09:38:46 -0500
Date: Mon, 27 Feb 2012 09:38:46 -0500
Message-Id: <e1s21iw-0003lo...@sgrv2.php.net>
To: phpbugs.20....@spamgourmet.com
Subject: Req #42608 [PATCH]: Example #660 (filter_input_array) is wrong
X-PHP-Originating-Script: 33:functions.php
From:  "PHP Bug Database - php-bugs@lists.php.net" <>
X-PHP-Bug: 42608
X-PHP-Site: PHP
In-Reply-To: <bug-42...@bugs.php.net>

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
https://bugs.php.net/bug.php?id=42608&edit=2

 ID:                 42608
 Patch added by:     datib...@php.net
 Reported by:        phpbugs dot 20 dot zsh at spamgourmet dot com
 Summary:            Example #660 (filter_input_array) is wrong
 Status:             Open
 Type:               Feature/Change Request
 Package:            Filter related
 Operating System:   Irrelevant
 PHP Version:        5.2.4
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: consistent_filter_input_array
Revision:   1330353526
URL:        
https://bugs.php.net/patch-display.php?bug=42608&patch=consistent_filter_input_array&revision=1330353526


Previous Comments:
------------------------------------------------------------------------
[2012-02-22 13:29:09] datib...@php.net

Fast forward to 2012, this is still wrong IMHO

Possible bugs:
1) documentation problem; the return value is defined as an array or false in 
case of failure - when the respective INPUT_XXX is not populated, it returns 
null; clearly not expected according to the documentation.
2) wrong behaviour in the code; if INPUT_XXX is not populated, I would expect 
the return value to be this: array_fill_keys(array_keys($definition), null)

------------------------------------------------------------------------
[2009-10-08 03:02:44] ChadFulton at gmail dot com

Although this is a very old bug, it seems to me that the poster is 
incorrect; I suspect the problem is that the poster attempted to set the 
$_POST array during runtime (e.g. $_POST = array( ... ); ), and 
filter_input_array does not allow runtime modification $_POST, $_GET, 
etc.

------------------------------------------------------------------------
[2007-09-10 11:04:44] phpbugs dot 20 dot zsh at spamgourmet dot com

Description:
------------
The example will not output the array shown below the example code -- any 
undefined variable will cause filter_input_array() to return (so the output 
would be "NULL").

You'll notice I've classified this as a change request rather than a 
documentation problem, for the expected (and described ("Return Values")) 
behavior in example #660 makes WAY more sense.

Reproduce code:
---------------
http://www.php.net/filter_input_array



------------------------------------------------------------------------




Reply via email to