Fix access on null warning

This commit is contained in:
Tetrakern 2024-04-08 02:16:28 +02:00
parent b967e2a68d
commit 102dcbd821

View File

@ -447,7 +447,7 @@ function fictioneer_bypass_password( $required, $post ) {
}
// Check capability per post type...
switch ( $post->post_type ) {
switch ( $post->post_type ?? 0 ) {
case 'post':
$required = current_user_can( 'fcn_ignore_post_passwords' ) ? false : $required;
break;