Skip to content

Commit

Permalink
Merge pull request #163 from BeAPI/issue/76995
Browse files Browse the repository at this point in the history
issue/76995 : undefined array key 0 issue
  • Loading branch information
stephane-gillot authored Nov 28, 2024
2 parents a48058e + 4b192f4 commit 342c79b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/admin/admin-restrictions.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static function map_meta_cap( $caps, $cap, $user_id, $args ) {
}

if ( in_array( $cap, $capabilities ) ) {
$post = get_post( $args[0] );
$post = isset( $args[0] ) ? get_post( $args[0] ) : null;
if ( empty( $post ) || is_wp_error( $post ) ) {
return $caps;
}
Expand Down

0 comments on commit 342c79b

Please sign in to comment.