From 7a185b5d0a5949be2bd0baff3f4bc5eb65bfce03 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 17:38:56 +0200 Subject: [PATCH] Fix filter_(var|input)_array default --- ext/filter/filter.stub.php | 4 ++-- ext/filter/filter_arginfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 517a3a055c..0923b9ba16 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -21,13 +21,13 @@ function filter_var($variable, int $filter = FILTER_DEFAULT, $options = null) {} * @param mixed $options * @return mixed */ -function filter_input_array(int $type, $options = null, bool $add_empty = true) {} +function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true) {} /** * @param mixed $options * @return mixed */ -function filter_var_array(array $data, $options = null, bool $add_empty = true) {} +function filter_var_array(array $data, $options = FILTER_DEFAULT, bool $add_empty = true) {} function filter_list(): array {} diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h index 8d3f1c0394..8e2e2763cd 100644 --- a/ext/filter/filter_arginfo.h +++ b/ext/filter/filter_arginfo.h @@ -20,13 +20,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "FILTER_DEFAULT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var_array, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, options, "FILTER_DEFAULT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() -- 2.40.0