Make WordPress Core

Ticket #20285: author_metadata_fix2.patch

File author_metadata_fix2.patch, 561 bytes (added by fredwu, 12 years ago)
  • wp-includes/author-template.php

    diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php
    index 4b21e44..e9e98bd 100644
    a b function get_the_author_meta($field = '', $user_id = false) { 
    109109
    110110 if ( 'id' == $field )
    111111   $value = isset($authordata->ID) ? (int)$authordata->ID : 0;
    112  elseif ( isset($authordata->$user_field) )
     112 elseif ( !empty($authordata->$user_field) )
    113113   $value = $authordata->$user_field;
    114114 else
    115115   $value = isset($authordata->$field) ? $authordata->$field : '';