Change WordPress user roles and capabilities Forums Bug Reports Fatal error: Uncaught ErrorException: Trying to get property of non-object

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4170
    isdaweb
    Participant

    Fatal error: Uncaught ErrorException: Trying to get property of non-object in wp-content/plugins/user-role-editor-pro/includes/classes/ure-lib.php:585 Stack trace: #0 wp-content/plugins/user-role-editor-pro/includes/classes/ure-lib.php(585): exception_error_handler(8, ‘Trying to get p…’, ‘/var/www/html/i…’, 585, Array) #1 wp-content/plugins/user-role-editor-pro/includes/classes/user-role-editor.php(167): URE_Lib->user_is_admin(0) #2 wp-content/plugins/user-role-editor-pro/pro/includes/classes/user-role-editor-pro.php(63): User_Role_Editor->plugin_init() #3 wp-includes/class-wp-hook.php(298): User_Role_Editor_Pro->plugin_init(”) #4 wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #5 wp-includes/plugin.php(453): WP_Hook->do_action(Array) #6 wp-admin/admin.php(154): do_action(‘admin_init’) #7 wp-content/plugins/user-role-editor-pro/includes/classes/ure-lib.php on line 585

    #4171
    isdaweb
    Participant

    This happened when I activated the plugin.

    The global $current_user wasn’t accessible. I fixed it by replacing line 585 with get_current_user_id();

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