Skip to content

Commit

Permalink
fix: bug when author missing bio
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimds committed Nov 1, 2023
1 parent ebf1948 commit 513fc4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/themes/awasqa/src/carbon-fields-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ function get_issue_options()
$name = Awasqa\Authors\awasqa_get_author_name($user_id);
$image_id = $meta['awasqa_profile_pic_id'][0] ?? 0;
$image_url = $image_id ? wp_get_attachment_image_src($image_id) : null;
$bio = $meta['description'][0] ?? "";
$author_data[] = [
"link" => get_author_posts_url($user_id),
"name" => $name,
"bio" => __($meta['description'][0], "Authors") ?? "",
"bio" => $bio ? __($bio, "Authors") : "",
"image_url" => $image_url[0] ?? null
];
}
Expand Down

0 comments on commit 513fc4c

Please sign in to comment.