Call of /wp-admin/user-edit.php leads to Fatal error

Support MB Include Exclude Call of /wp-admin/user-edit.php leads to Fatal errorResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43755
    Aaron KesslerAaron Kessler
    Participant

    Instead, a wp_die() Error-Message is expected.

    PHP Warning: Undefined array key "user_id" in […]/wp-content/plugins/meta-box-include-exclude/class-mb-include-exclude.php on line 288PHP message: PHP Warning: Attempt to read property "roles" on bool in /home/wp/disk/wordpress/wp-content/plugins/meta-box-include-exclude/class-mb-include-exclude.php on line 292
    PHP Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in […]/wp-content/plugins/meta-box-include-exclude/class-mb-include-exclude.php:292

    #43762
    PeterPeter
    Moderator

    Hello Aaron,

    Can you please check the edited user role setting? If it is empty (or null), please assign it to a user role and recheck this issue.

    #43764
    Aaron KesslerAaron Kessler
    Participant

    It does not matter to which role

    
    'include' => [
            'relation'         => 'OR',
            'edited_user_role' => ['designated_role'],
        ],
    

    is set.

    Just to make it more obvious: I think you should catch the case when someone tries to open /wp-admin/user-edit.php without any parameters. Without MB Include Exclude it shows: wp_die( __( 'Invalid user ID.' ) );

    #43769
    PeterPeter
    Moderator

    Hello,

    Thanks for your details. It happens with PHP 8+ version. I will inform the development team to improve this case in future updates.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.