WordPress.org

Make WordPress Core

Ticket #22342: meta.php.2.patch

File meta.php.2.patch, 436 bytes (added by doublesharp, 18 months ago)

silences undefined index notice with @$check[0]

  • wp-includes/meta.php

     
    274274        $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single ); 
    275275        if ( null !== $check ) { 
    276276                if ( $single && is_array( $check ) ) 
    277                         return $check[0]; 
     277                        return @$check[0]; 
    278278                else 
    279279                        return $check; 
    280280        }