Skip to content

Commit

Permalink
Early return if meta is false
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtangajjar committed Jul 4, 2024
1 parent 6443723 commit a382cfd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ function excluded_meta() {
function prepare_meta( $post_id ) {
update_postmeta_cache( array( $post_id ) );
$meta = get_post_meta( $post_id );

Check warning on line 437 in includes/utils.php

View workflow job for this annotation

GitHub Actions / phpcs

Equals sign not aligned correctly; expected 1 space but found 10 spaces

if ( false === $meta ) {
return array();
}

$meta = is_array( $meta ) ? $meta : array();
$prepared_meta = array();
$excluded_meta = excluded_meta();
Expand Down

0 comments on commit a382cfd

Please sign in to comment.