]> 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)
ext/filter/filter.c

index e3ced880c493d62379677c0d598b87f9639b85a4..fd3fd9351b003345433630d30bc333e5825d3925 100644 (file)
@@ -781,7 +781,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