• Resolved fohly

    (@fohly)


    Hi, on our site where we use your plugin we get about 20 notices like this per day:

    PHP Notice: Trying to get property ‘ID’ of non-object in … wp-2fa/includes/classes/Admin/Helpers/class-user-helper.php on line 528 in function User_Helper->set_meta()

    Same message for line 593 in User_Helper->set_user()

    We use PHP version 7.4.33

    Please let me know if you need further information to fix this – thank you!

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

    (@robert681)

    Thank you for using our plugin @fohly

    I am sorry to read about your issue. Can you please confirm what version of the plugin and WordPress are you running?

    Also, do you know how to reproduce this? As in do you know what you or any of your users are doing to trigger this notice?

    Looking forward to hearing from you.

    Thread Starter fohly

    (@fohly)

    Hi Robert, thank you for getting back to me on this. I am using WordPress Version 6.2.2 and the plugin version is 2.4.1. The problem has been around on the last few versions, already. By the kind of error and the code line where it is logged, it seems to happen when the object self::$user is not set. So probably when a user not logged in is opening a page on the system.

    If it helps I can log additional variables when the error occurs, just let me know what values are you are interested in.

    All the best

    Florian

    Plugin Contributor robertabela

    (@robert681)

    Hello @fohly

    We have a patch for you. Can you please download the latest WP 2FA plugin patch from the patches page?

    Can you please confirm if this fixes the issue?

    Looking forward to hearing from you

    Thread Starter fohly

    (@fohly)

    Hi Robert, thank you and sorry for my late reaction, just came back from vacation. When I try to access the patches page you linked to above I get a 404 error. Do you have another way I can access this patch?

    Best regards

    Florian

    • This reply was modified 1 year, 7 months ago by fohly.
    Plugin Contributor robertabela

    (@robert681)

    Hello @fohly

    I hope you enjoyed your vacation. Today we have just released update 2.5.0. Please install that update of the plugin and that should solve the issue.

    Can you please check and confirm?

    Thread Starter fohly

    (@fohly)

    Dear Robert, I installed the update and watched the logs for a while. No more PHP notices of the kind any more. Thank you for your support and resolving this problem!

    Plugin Contributor robertabela

    (@robert681)

    I am glad to hear that @fohly

    Can you please spare a minute to rate our plugin and service? These ratings are really helpful.

    Thank you and have a great day.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP notice in class-user-helper.php’ is closed to new replies.