]> granicus.if.org Git - php/commitdiff
Fixed bug #50632 (filter_input() does not return default value if the variable does...
authorIlia Alshanetsky <iliaa@php.net>
Sun, 3 Jan 2010 22:58:37 +0000 (22:58 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 3 Jan 2010 22:58:37 +0000 (22:58 +0000)
NEWS
ext/filter/filter.c

diff --git a/NEWS b/NEWS
index 9a15e47f069694a46cc8fcd48de46e4e43621ac6..6f4a3f1b7bcf848c56bce439f0598595cb56680b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP                                                                        NEWS
 
 - Fixed bug #50636 (MySQLi_Result sets values before calling constructor).
   (Pierrick)
+- Fixed bug #50632 (filter_input() does not return default value if the
+  variable does not exist). (Ilia)
 - Fixed bug #48190 (Content-type parameter "boundary" is not case-insensitive
   in HTTP uploads). (Ilia)
 - Fixed bug #47409 (extract() problem with array containing word "this").
index 517bf2e4f9afdadd3e4466e3e475dffc505d644b..e417e5d9d86f833aa7800649fa38013926a799be 100644 (file)
@@ -768,7 +768,8 @@ PHP_FUNCTION(filter_input)
                                filter_flags = Z_LVAL_PP(filter_args);
                        } else if (Z_TYPE_PP(filter_args) == IS_ARRAY && zend_hash_find(HASH_OF(*filter_args), "flags", sizeof("flags"), (void **)&option) == SUCCESS) {
                                PHP_FILTER_GET_LONG_OPT(option, filter_flags);
-                       } else if (Z_TYPE_PP(filter_args) == IS_ARRAY && 
+                       }
+                       if (Z_TYPE_PP(filter_args) == IS_ARRAY && 
                                zend_hash_find(HASH_OF(*filter_args), "options", sizeof("options"), (void **)&opt) == SUCCESS &&
                                Z_TYPE_PP(opt) == IS_ARRAY &&
                                zend_hash_find(HASH_OF(*opt), "default", sizeof("default"), (void **)&def) == SUCCESS