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.zsh@spamgourmet.com
SMTP error from remote mail server after RCPT TO:<phpbugs.20.zsh@spamgourmet.com>:
host mx-ha02.web.de [217.72.192.188]: 550 <phpbugs.20.zsh@spamgourmet.com> Benutzer nicht
bekannt/User unknown
------ This is a copy of the message, including all the headers. ------
Return-path: phpbugs.20.zsh@spamgourmet.com
Received: from spamgourmet by gourmet7.spamgourmet.com with local (Exim 4.69)
(envelope-from <>)
id 1S0CFw-0000aj-7d
for phpbugs.20.zsh@spamgourmet.com; Wed, 22 Feb 2012 13:29:16 +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 <noreply@php.net>)
id 1S0CFw-0000aH-02
for phpbugs.20.zsh@spamgourmet.com; Wed, 22 Feb 2012 13:29:16 +0000
Received: from www-data by sgrv2.php.net with local (Exim 4.71)
(envelope-from <noreply@php.net>)
id 1S0CFp-0003N8-Pz
for phpbugs.20.zsh@spamgourmet.com; Wed, 22 Feb 2012 08:29:09 -0500
Date: Wed, 22 Feb 2012 08:29:09 -0500
Message-Id: <E1S0CFp-0003N8-Pz@sgrv2.php.net>
To: phpbugs.20.zsh@spamgourmet.com
Subject: Req #42608 [Opn]: 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-42608@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
Updated by: datibbaw@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:
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)
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------