diff --git a/classes/admin/admin-restrictions.php b/classes/admin/admin-restrictions.php index cda09ad..730cb6e 100644 --- a/classes/admin/admin-restrictions.php +++ b/classes/admin/admin-restrictions.php @@ -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; }