File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -6024,6 +6024,7 @@ PHP_FUNCTION(array_map)
6024
6024
zend_ulong num_key ;
6025
6025
zend_string * str_key ;
6026
6026
zval * zv , arg ;
6027
+ int ret ;
6027
6028
6028
6029
if (Z_TYPE (arrays [0 ]) != IS_ARRAY ) {
6029
6030
php_error_docref (NULL , E_WARNING , "Argument #%d should be an array" , 2 );
@@ -6046,13 +6047,11 @@ PHP_FUNCTION(array_map)
6046
6047
fci .no_separation = 0 ;
6047
6048
6048
6049
ZVAL_COPY (& arg , zv );
6049
-
6050
- if ( zend_call_function ( & fci , & fci_cache ) != SUCCESS || Z_TYPE ( result ) == IS_UNDEF ) {
6051
- zval_dtor ( return_value );
6052
- zval_ptr_dtor ( & arg );
6050
+ ret = zend_call_function ( & fci , & fci_cache );
6051
+ i_zval_ptr_dtor ( & arg ZEND_FILE_LINE_CC );
6052
+ if ( ret != SUCCESS || Z_TYPE ( result ) == IS_UNDEF ) {
6053
+ zend_array_destroy ( Z_ARR_P ( return_value ) );
6053
6054
RETURN_NULL ();
6054
- } else {
6055
- zval_ptr_dtor (& arg );
6056
6055
}
6057
6056
if (str_key ) {
6058
6057
zend_hash_add_new (Z_ARRVAL_P (return_value ), str_key , & result );
@@ -6136,7 +6135,7 @@ PHP_FUNCTION(array_map)
6136
6135
6137
6136
if (zend_call_function (& fci , & fci_cache ) != SUCCESS || Z_TYPE (result ) == IS_UNDEF ) {
6138
6137
efree (array_pos );
6139
- zval_dtor ( return_value );
6138
+ zend_array_destroy ( Z_ARR_P ( return_value ) );
6140
6139
for (i = 0 ; i < n_arrays ; i ++ ) {
6141
6140
zval_ptr_dtor (& params [i ]);
6142
6141
}
You can’t perform that action at this time.
0 commit comments