WordPress.org

Make WordPress Core

Ticket #11839: post-template.php.diff

File post-template.php.diff, 391 bytes (added by sirzooro, 8 years ago)
  • post-template.php

    old new  
    646646function post_custom( $key = '' ) {
    647647        $custom = get_post_custom();
    648648
    649         if ( 1 == count($custom[$key]) )
     649        if ( !isset( $custom[$key] ) )
     650                return '';
     651        elseif ( 1 == count($custom[$key]) )
    650652                return $custom[$key][0];
    651653        else
    652654                return $custom[$key];