Skip to content

Commit

Permalink
fix(warning): Attempt to read property "ID" on null WP-for-Church#303
Browse files Browse the repository at this point in the history
  • Loading branch information
DumbergerL authored Apr 19, 2023
1 parent d8ce547 commit bb536e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/sm-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function get_wpfc_sermon_meta( $meta_key = '', $post = null ) {
global $post;
}

$data = get_post_meta( $post->ID, $meta_key, true );
$data = get_post_meta( $post?->ID, $meta_key, true );
if ( '' !== $data ) {
return $data;
}
Expand Down

0 comments on commit bb536e1

Please sign in to comment.