How to show author page link

Have you tried something like:

/*Get number of entries*/
function get_entries_num( $id ) {
    $count=  count_user_posts( $id );
    if ($count == 1) 
    {
        return '<a href="'.get_author_posts_url($id).'">'.sprintf(__('%s total post','upme'), $count).'</a>';
    } else 
    {
        return '<a href="'.get_author_posts_url($id).'">'.sprintf(__('%s total posts','upme'), $count).'</a>';
    }
}

error code: 523