Skip to content

Commit

Permalink
Fixed bug #50632 (filter_input() does not return default value if the…
Browse files Browse the repository at this point in the history
… variable does not exist)
  • Loading branch information
Ilia Alshanetsky committed Jan 3, 2010
1 parent d005f1d commit 57399bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion ext/filter/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57399bc

Please sign in to comment.