Change WordPress user roles and capabilities Forums Bug Reports Fatal error: Uncaught Error: Call to a member function has_cap()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #4172

    from /wp-admin/users.php

    Fatal error: Uncaught Error: Call to a member function has_cap() on null in wp-content/plugins/user-role-editor-pro/includes/classes/user-role-editor.php:388 Stack trace: #0 wp-includes/class-wp-hook.php(298): User_Role_Editor->user_row(Array, Object(WP_User)) #1 wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 wp-admin/includes/class-wp-users-list-table.php(427): apply_filters(‘user_row_action…’, Array, Object(WP_User)) #3 wp-admin/includes/class-wp-users-list-table.php(364): WP_Users_List_Table->single_row(Object(WP_User), ”, ”, ‘3160’) #4 wp-admin/includes/class-wp-list-table.php(1213): WP_Users_List_Table->display_rows() #5 wp-admin/includes/class-wp-list-table.php(1141): WP_List_Table->display_rows_or_placeholder() #6 wp-admin/users.php(516): WP_List_Table->display() #7 {main} thrown in wp-content/plugins/user-role-editor-pro/includes/classes/user-role-editor.php on line 388


    Same issue, global current_user is null.


    Thanks for your messages.

    I use WordPress global $current_user often at User Role Editor.
    It’s the 1st message for years about such kind of PHP fatal error. I wonder, why this global variable $current_user is not initialized at your WP installation? Some code removes its value especially or custom authorization process is realized, which does not initialize $current_user for some reason the same way as WordPress does?

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