]> 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 3e2ebfc70b3f4308b6f694c65b50c4552dca97d9..ee8df5944d9174624fd8fdf9b1068e8cd19b7d18 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,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 #50575 (PDO_PGSQL LOBs are not compatible with PostgreSQL 8.5).
   (Matteo)
 - Fixed bug #50558 (Broken object model when extending tidy). (Pierrick)
index e631b8003493e8576f740910d575a63d92c8e70e..2be7fb2f7efd3915faada54e2765dee4d7c0bd07 100644 (file)
@@ -728,7 +728,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