@@ -6628,7 +6628,8 @@ static zend_result php_array_find(const HashTable *array, zend_fcall_info fci, z
66286628		ZVAL_COPY (& args [0 ], operand );
66296629
66306630		zend_result  result  =  zend_call_function (& fci , & fci_cache );
6631- 		if  (EXPECTED (result  ==  SUCCESS )) {
6631+ 		ZEND_ASSERT (result  ==  SUCCESS );
6632+ 		if  (EXPECTED (!Z_ISUNDEF (retval ))) {
66326633			int  retval_true ;
66336634
66346635			retval_true  =  zend_is_true (& retval );
@@ -6656,7 +6657,7 @@ static zend_result php_array_find(const HashTable *array, zend_fcall_info fci, z
66566657		zval_ptr_dtor (& args [0 ]);
66576658		zval_ptr_dtor (& args [1 ]);
66586659
6659- 		if  (UNEXPECTED (result   !=   SUCCESS )) {
6660+ 		if  (UNEXPECTED (Z_ISUNDEF ( retval ) )) {
66606661			return  FAILURE ;
66616662		}
66626663	} ZEND_HASH_FOREACH_END ();
@@ -6725,7 +6726,11 @@ PHP_FUNCTION(array_any)
67256726		RETURN_THROWS ();
67266727	}
67276728
6728- 	RETURN_BOOL (Z_TYPE_P (return_value ) !=  IS_UNDEF );
6729+ 	bool  retval  =  !Z_ISUNDEF_P (return_value );
6730+ 	if  (Z_TYPE_P (return_value ) ==  IS_STRING ) {
6731+ 		zval_ptr_dtor_str (return_value );
6732+ 	}
6733+ 	RETURN_BOOL (retval );
67296734}
67306735/* }}} */ 
67316736
@@ -6745,7 +6750,11 @@ PHP_FUNCTION(array_all)
67456750		RETURN_THROWS ();
67466751	}
67476752
6748- 	RETURN_BOOL (Z_TYPE_P (return_value ) ==  IS_UNDEF );
6753+ 	bool  retval  =  Z_ISUNDEF_P (return_value );
6754+ 	if  (Z_TYPE_P (return_value ) ==  IS_STRING ) {
6755+ 		zval_ptr_dtor_str (return_value );
6756+ 	}
6757+ 	RETURN_BOOL (retval );
67496758}
67506759/* }}} */ 
67516760
0 commit comments