Skip to content

Commit

Permalink
fix bool array access
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimds committed May 12, 2020
1 parent 6fdd9af commit 896769c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PostTypes/WordpressPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ protected function featuredImageAttachmentId() {

public function featuredImageUrl($image_size = 'thumbnail'){
$image = wp_get_attachment_image_src($this->featuredImageAttachmentId(), $image_size);
return $image[0];
return $image ? $image[0] : null;
}

public function featuredImage($size = 'thumbnail', $attrs = array()){
Expand Down

0 comments on commit 896769c

Please sign in to comment.