File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -520,6 +520,8 @@ static void php_filter_call(
520520
521521 /* Cannot use both FILTER_NULL_ON_FAILURE and FILTER_THROW_ON_FAILURE */
522522 if ((filter_flags & FILTER_NULL_ON_FAILURE ) && (filter_flags & FILTER_THROW_ON_FAILURE )) {
523+ zval_ptr_dtor (filtered );
524+ ZVAL_NULL (filtered );
523525 zend_argument_value_error (
524526 options_arg_num ,
525527 "cannot use both FILTER_NULL_ON_FAILURE and FILTER_THROW_ON_FAILURE"
@@ -531,6 +533,7 @@ static void php_filter_call(
531533 if (filter_flags & FILTER_REQUIRE_SCALAR ) {
532534 zval_ptr_dtor (filtered );
533535 if (filter_flags & FILTER_THROW_ON_FAILURE ) {
536+ ZVAL_NULL (filtered );
534537 zend_throw_exception (
535538 php_filter_failed_exception_ce ,
536539 "filter validation failed: not a scalar value (got an array)" ,
@@ -550,6 +553,7 @@ static void php_filter_call(
550553 const char * got_type = zend_zval_value_name (filtered );
551554 zval_ptr_dtor (filtered );
552555 if (filter_flags & FILTER_THROW_ON_FAILURE ) {
556+ ZVAL_NULL (filtered );
553557 zend_throw_exception_ex (
554558 php_filter_failed_exception_ce ,
555559 0 ,
You can’t perform that action at this time.
0 commit comments