From dc157b93cd761ecf77ad414ca4296b08bb22a26b Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sat, 5 May 2018 16:24:41 +0000 Subject: [PATCH] Fix #42608: Example 660 (filter_input_array) is wrong git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344963 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../filter/functions/filter-input-array.xml | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/reference/filter/functions/filter-input-array.xml b/reference/filter/functions/filter-input-array.xml index 24d6adbd85..6da6e47c04 100644 --- a/reference/filter/functions/filter-input-array.xml +++ b/reference/filter/functions/filter-input-array.xml @@ -67,11 +67,17 @@ &reftitle.returnvalues; - An array containing the values of the requested variables on success, or &false; - on failure. An array value will be &false; if the filter fails, or &null; if + An array containing the values of the requested variables on success. + If the input array designated by type is not populated, + the function returns &null; if the FILTER_NULL_ON_FAILURE + flag is not given, or &false; otherwise. For other failures, &false; is returned. + + + An array value will be &false; if the filter fails, or &null; if the variable is not set. Or if the flag FILTER_NULL_ON_FAILURE is used, it returns &false; if the variable is not set and &null; if the filter - fails. + fails. If the add_empty parameter is &false;, no array + element will be added for unset variables. @@ -87,10 +93,10 @@ error_reporting(E_ALL | E_STRICT); /* data actually came from POST $_POST = array( 'product_id' => 'libgd