• Resolved Fred001

    (@fred001)


    I have this fatal error for me first activation of Solid Securit.
    An idea to resolve ?

    Thanks

    Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /home/my_way/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-canonical-roles.php:165 Stack trace: #0 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-canonical-roles.php(165): array_filter() #1 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/validator.php(299): ITSEC_Lib_Canonical_Roles::get_canonical_role_from_role() #2 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/validator.php(28): ITSEC_Notification_Center_Validator->get_available_admin_users_and_roles() #3 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/lib/validator.php(63): ITSEC_Notification_Center_Validator->validate_settings() #4 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/lib/settings.php(284): ITSEC_Validator->validate() #5 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules.php(333): ITSEC_Settings->set_all() #6 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/class-notification-center.php(771): ITSEC_Modules::set_settings() #7 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/class-notification-center.php(721): ITSEC_Notification_Center->send_scheduled_notifications() #8 /home/my_way/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/class-notification-center.php(677): ITSEC_Notification_Center->check_notification_schedule_accurate() #9 /home/my_way/public_html/wp-includes/class-wp-hook.php(324): ITSEC_Notification_Center->check_notification_schedule_fast() #10 /home/my_way/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #11 /home/my_way/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #12 /home/my_way/public_html/wp-settings.php(643): do_action() #13 /home/my_way/public_html/wp-config.php(93): require_once(‘…’) #14 /home/my_way/public_html/wp-load.php(50): require_once(‘…’) #15 /home/my_way/public_html/wp-admin/admin.php(34): require_once(‘…’) #16 /home/my_way/public_html/wp-admin/plugins.php(10): require_once(‘…’) #17 {main} thrown in /home/my_way/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-canonical-roles.php on line 165

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @fred001,

    It looks like there is a (custom) role in your WordPress env with an invalid capabilities value of null. By default if a role’s capabilities are empty it should have a value of array() (an empty array). For proof have a look at the WordPress core add_role() function. The 3rd parameter ($capabilities) is optional. So if not specified it will default to an empty array (not null!).

    So check your roles for a valid capabilities value and correct the one(s) with a capabilities value of null. That should take care of the fatal error.

    +++ To prevent any confusion, I’m not SolidWP +++

    • This reply was modified 1 year, 3 months ago by nlpro.
    • This reply was modified 1 year, 3 months ago by nlpro.
    Thread Starter Fred001

    (@fred001)

    Thanks ! I don’t know how to check my roles. All seems ok in wp-admin (1 admin and 14 subscribers).
    Should I go and check something in the wp-user tables ?

    Hi @fred001,

    By default WordPress stores the roles data in the wp_options table (in the database). The name of the option is wp_user_roles.

    A regular WordPress site has 5 default roles: Administrator, Editor,?Author, Contributor and?Subscriber.

    Note that the roles data is stored in a single serialized array. Which makes it hard to edit (from eg PHPMyAdmin). However there are plenty of plugins out there (you may even already have one in place) that help in managing roles.

    I hope this helps.

    • This reply was modified 1 year, 3 months ago by nlpro.
    • This reply was modified 1 year, 3 months ago by nlpro.
    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @fred001, following up here to make sure you’re all set.

    I hope the information provided by @nlpro helped resolve the issue. Tracking notifications on this forum can become tricky over time, and due to inactivity, I’ll mark this post resolved.

    If you still require further assistance, feel free to open a new support topic, and we’d be happy to assist.

    Thank you!

    Thread Starter Fred001

    (@fred001)

    Sorry, all thanks, it’s ok for me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error for the first activation’ is closed to new replies.