• Resolved VL

    (@ravolar)


    Hello, there is error on every site, is there any idea what it could be?

    Warning: in_array() expects parameter 2 to be array, string given in —/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 303

    Warning: Invalid argument supplied for foreach() in —/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 361

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor robertabela

    (@robert681)

    Hello @ravolar

    Thank you for trying our plugin. I am sorry to read about your issue.

    Is this the first time you are trying the plugin or is this an error you started seeing since upgrading (and before it was working)?

    Also, where and when are you seeing this error please? The more information you can give us the better we can understand the context of this issue.

    Looking forward to hearing from you.

    Thread Starter VL

    (@ravolar)

    Dear Robert
    I have been using your plugin for long time and there wasn’t any problem. It came only last month. Please check screenshot https://share.getcloudapp.com/o0ueoKGX

    Plugin Contributor robertabela

    (@robert681)

    Thank you for the screenshot @ravolar

    Can you please tell us when are you seeing the error, and how to reproduce the issue?

    Looking forward to hearing from you.

    Thread Starter VL

    (@ravolar)

    Just login as admin and see the warning on every admin page

    Plugin Contributor robertabela

    (@robert681)

    Hello @ravolar

    We have released an update of the plugin two days ago which addresses this issue. Can you install update 1.6.2 and advise?

    Looking forward to hearing from you.

    Thread Starter VL

    (@ravolar)

    Actually the same problem:

    Warning: in_array() expects parameter 2 to be array, string given in …/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 357

    Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 406

    Plugin Contributor robertabela

    (@robert681)

    Hello @ravolar

    I am really sorry about the late response. We’ve looked into this and the errors are being generated because the plugin settings cannot be updated. This is very strange and we cannot reproduce it ourselves.

    Can you please try to re-populate the settings for the excluded users and included sites? You can remove the current settings and specify them again.

    If this issue persists after doing the above, please send us an email at support at wpwhitesecurity dot com so we can continue troubleshooting this issue.

    Looking forward to hearing from you.

    Hello, here the same errors:

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 406

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/wp-2fa/includes/classes/WP2FA.php on line 406

    Version: 1.6.2
    Php: 7.4

    The value of “$included_sites” is False so it is not possible to loop over it. So you can fix it with a “is_array” check.

    Plugin Contributor robertabela

    (@robert681)

    Hello @tdwesten

    Your issue is different than the one originally reported in this thread. Please open your own ticket for support. Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Warnings on admin pages’ is closed to new replies.