Make WordPress Core

Ticket #15030: meta_recursive_unserialize.3.diff

File meta_recursive_unserialize.3.diff, 497 bytes (added by mattkeys, 10 years ago)

replacing array_walk_recursive with simple foreach

  • wp-includes/meta.php

     
    478478                $meta_cache = $meta_cache[$object_id];
    479479        }
    480480
    481         if ( !$meta_key )
     481        if ( !$meta_key ) {
     482                foreach ( $meta_cache as &$meta_values ) {
     483                        $meta_values = array_map( 'maybe_unserialize', $meta_values );
     484                }
     485
    482486                return $meta_cache;
     487        }
    483488
    484489        if ( isset($meta_cache[$meta_key]) ) {
    485490                if ( $single )