diff options
| author | Pierre Joye <pajoye@php.net> | 2007-04-04 20:50:26 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2007-04-04 20:50:26 +0000 |
| commit | 2caba30962c4c1216a22eb63848c412764f51ec5 (patch) | |
| tree | 2785982ad213455b56a16b2efbf251ecfe7a6f8f /ext/filter | |
| parent | 39f9184fa6e8ffa949bb1e1d85310dcc0096be0f (diff) | |
| download | php-git-2caba30962c4c1216a22eb63848c412764f51ec5.tar.gz | |
- #40947, allow a single filter as argument for filter_var_array
Diffstat (limited to 'ext/filter')
| -rw-r--r-- | ext/filter/filter.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 45cf86004c..dff2ea65b0 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -776,8 +776,10 @@ PHP_FUNCTION(filter_input_array) return; } - if (op && ( (Z_TYPE_PP(op) == IS_LONG && !PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op))) - || Z_TYPE_PP(op) != IS_ARRAY)) { + if (op + && (Z_TYPE_PP(op) != IS_ARRAY) + && (Z_TYPE_PP(op) == IS_LONG && !PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op))) + ) { RETURN_FALSE; } @@ -815,8 +817,10 @@ PHP_FUNCTION(filter_var_array) return; } - if (op && ( (Z_TYPE_PP(op) == IS_LONG && !PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op))) - || Z_TYPE_PP(op) != IS_ARRAY)) { + if (op + && (Z_TYPE_PP(op) != IS_ARRAY) + && (Z_TYPE_PP(op) == IS_LONG && !PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op))) + ) { RETURN_FALSE; } |
