Skip to content

Commit

Permalink
Check return value of get_post_meta
Browse files Browse the repository at this point in the history
  • Loading branch information
dhanendran committed Dec 8, 2023
1 parent da28b5d commit 86c3424
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ function excluded_meta() {
function prepare_meta( $post_id ) {
update_postmeta_cache( array( $post_id ) );
$meta = get_post_meta( $post_id );
$meta = is_array( $meta ) ? $meta : array();
$prepared_meta = array();
$excluded_meta = excluded_meta();

Expand Down

0 comments on commit 86c3424

Please sign in to comment.