• Is anyone else getting this error when test driving PHP8.2? Is this something that is being worked on currently? I am afraid I will have to deactivate this plugin so my sites don’t break when our server is upgraded to PHP8.2 at the end of the month.

    PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php:139#012Stack trace:#012#0 /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php(139): array_map(‘members_validat…’, ‘editor’)#012#1 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(93): Members\Role->__construct(‘internal-docume…’, Array)#012#2 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(47): members_register_role(‘internal-docume…’, Array)#012#3 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): members_register_default_roles(Object(WP_Roles))#012#4 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array)#012#5 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#6 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(27): do_action(‘members_registe…’, Object(WP_Roles))#012#7 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): members_register_roles(Object(WP_Roles))#012#8 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array)#012#9 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#10 /nas/content/live/topixpharm/wp-includes/class-wp-roles.php(303): do_action(‘wp_roles_init’, Object(WP_Roles))#012#11 /nas/content/live/topixpharm/wp-includes/class-wp-roles.php(332): WP_Roles->init_roles()#012#12 /nas/content/live/topixpharm/wp-includes/class-wp-roles.php(91): WP_Roles->for_site(NULL)#012#13 /nas/content/live/topixpharm/wp-includes/capabilities.php(1001): WP_Roles->__construct()#012#14 /nas/content/live/topixpharm/wp-includes/class-wp-user.php(509): wp_roles()#012#15 /nas/content/live/topixpharm/wp-includes/class-wp-user.php(876): WP_User->get_role_caps()#012#16 /nas/content/live/topixpharm/wp-includes/class-wp-user.php(178): WP_User->for_site(”)#012#17 /nas/content/live/topixpharm/wp-includes/pluggable.php(109): WP_User->init(Object(stdClass))#012#18 /nas/content/live/topixpharm/wp-includes/pluggable.php(743): get_user_by(‘login’, ‘stephen’)#012#19 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): wp_validate_auth_cookie(false)#012#20 /nas/content/live/topixpharm/wp-includes/plugin.php(205): WP_Hook->apply_filters(false, Array)#012#21 /nas/content/live/topixpharm/wp-includes/user.php(3622): apply_filters(‘determine_curre…’, false)#012#22 /nas/content/live/topixpharm/wp-includes/pluggable.php(70): _wp_get_current_user()#012#23 /nas/content/live/topixpharm/wp-includes/l10n.php(98): wp_get_current_user()#012#24 /nas/content/live/topixpharm/wp-includes/l10n.php(152): get_user_locale()#012#25 /nas/content/live/topixpharm/wp-includes/l10n.php(894): determine_locale()#012#26 /nas/content/live/topixpharm/wp-includes/class-wp-fatal-error-handler.php(47): load_default_textdomain()#012#27 [internal function]: WP_Fatal_Error_Handler->handle()#012#28 {main}#012 thrown in /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php on line 139

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • same here. entire site has error

    Plugin Author Caseproof

    (@caseproof)

    Hi @smcnearney, @metal_13

    Do you see this error when you install plugin on PHP 8.2 or when you do some action in WordPress Dashboard? I’m asking because I tested the latest version with PHP 8.2 and could not replicate this error.

    I noticed in the error log that the second argument in array_map is $this->caps and is defined as an array of capabiliites, but in the log it is passed as a string: “editor” for some reason.

    Best

    i reuploaded the plugin and its working now. not sure how some files were deleted.

    • This reply was modified 1 year, 1 month ago by Metal_13.
    Plugin Author Caseproof

    (@caseproof)

    Thanks for checking. I’m glad to hear it’s working as expected.

    Best

    Thread Starter McNearns

    (@smcnearney)

    I tried re-uploading the plugin after that worked for Metal_13 and it is now working for me as well.

    Thread Starter McNearns

    (@smcnearney)

    Sorry that did not fix it actually. I was test driving on a different sub-site that does not have the plugin activated at all.

    Thread Starter McNearns

    (@smcnearney)

    PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php:139#012Stack trace:#012#0 /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php(139): array_map(‘members_validat…’, ‘editor’)#012#1 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(93): Members\Role->__construct(‘internal-docume…’, Array)#012#2 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(47): members_register_role(‘internal-docume…’, Array)#012#3 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): members_register_default_roles(Object(WP_Roles))#012#4 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array)#012#5 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#6 /nas/content/live/topixpharm/wp-content/plugins/members/inc/functions-roles.php(27): do_action(‘members_registe…’, Object(WP_Roles))#012#7 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): members_register_roles(Object(WP_Roles))#012#8 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array)#012#9 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#10 /nas/content/live/topixpharm/wp-includes/class-wp-roles.php(303): do_action(‘wp_roles_init’, Object(WP_Roles))#012#11 /nas/content/live/topixpharm/wp-includes/class-wp-roles.php(332): WP_Roles->init_roles()#012#12 /nas/content/live/topixpharm/wp-includes/ms-blogs.php(703): WP_Roles->for_site(1)#012#13 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(312): wp_switch_roles_and_user(1, 9)#012#14 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)#012#15 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#16 /nas/content/live/topixpharm/wp-includes/ms-blogs.php(585): do_action(‘switch_blog’, 1, 9, ‘switch’)#012#17 /nas/content/live/topixpharm/wp-includes/ms-blogs.php(367): switch_to_blog(1)#012#18 /nas/content/live/topixpharm/wp-content/plugins/wp-mail-smtp/src/WP.php(318): get_blog_option(1, ‘wp_mail_smtp’, Array)#012#19 /nas/content/live/topixpharm/wp-content/plugins/wp-mail-smtp/src/Core.php(182): WPMailSMTP\WP::use_global_plugin_settings()#012#20 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(310): WPMailSMTP\Core->init(”)#012#21 /nas/content/live/topixpharm/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)#012#22 /nas/content/live/topixpharm/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#23 /nas/content/live/topixpharm/wp-settings.php(632): do_action(‘init’)#012#24 /nas/content/live/topixpharm/wp-config.php(135): require_once(‘/nas/content/li…’)#012#25 /nas/content/live/topixpharm/wp-load.php(50): require_once(‘/nas/content/li…’)#012#26 /nas/content/live/topixpharm/wp-blog-header.php(13): require_once(‘/nas/content/li…’)#012#27 /nas/content/live/topixpharm/index.php(17): require(‘/nas/content/li…’)#012#28 {main}#012 thrown in /nas/content/live/topixpharm/wp-content/plugins/members/inc/class-role.php on line 139

    I can get to the dashboard initially when using WPEngine’s test drive feature, but then when I try to visit the site I get the critical error.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    @caseproof

    I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials on these forums.

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for credentials will result in us escalating this to the plugins team.

    It’s never necessary to do that. Here’s why.

    There are many ways to get information you need and accessing the user’s site is not one of them. That’s going too far.

    • Ask for a link to the https://pastebin.com/ or https://gist.github.com log of the user’s web server error log.
    • Ask the user to create and post a link to their phpinfo(); output.
    • Ask the user to install the Health Check plugin and get the data that way.
    • Walk the user through enabling WP_DEBUG and how to log that output to a file and how to share that file.
    • Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again.
    • Ask the user for the step-by-step on how they can reproduce the problem.

    You get the idea.

    Volunteer support is not easy. But these forums need to a safe place for all users, experienced or new. Accessing their system that way is a short cut that will get you into real trouble in these forums.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error when test driving PHP 8.2’ is closed to new replies.