From a8bc3889fd07fb4897d1e2b7f2d2b15388d76e39 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 11 Oct 2018 11:55:16 +0200 Subject: Remember redundant check in filter.c We already check existence through zend_hash_str_find, no need to check it twice. --- ext/filter/filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/filter') diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 987e3e7ef5..5b69024526 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -410,8 +410,7 @@ static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval handle_default: if (options && (Z_TYPE_P(options) == IS_ARRAY || Z_TYPE_P(options) == IS_OBJECT) && ((flags & FILTER_NULL_ON_FAILURE && Z_TYPE_P(value) == IS_NULL) || - (!(flags & FILTER_NULL_ON_FAILURE) && Z_TYPE_P(value) == IS_FALSE)) && - zend_hash_str_exists(HASH_OF(options), "default", sizeof("default") - 1)) { + (!(flags & FILTER_NULL_ON_FAILURE) && Z_TYPE_P(value) == IS_FALSE))) { zval *tmp; if ((tmp = zend_hash_str_find(HASH_OF(options), "default", sizeof("default") - 1)) != NULL) { ZVAL_COPY(value, tmp); -- cgit v1.2.1