URL: /user/x/security/tfa
Error: Warning: Invalid argument supplied for foreach() in Drupal\tfa\Plugin\TfaSetup\TfaTrustedBrowserSetup->getOverview() (line 200 of modules/contrib/tfa/src/Plugin/TfaSetup/TfaTrustedBrowserSetup.php).

If trusted browser features was enabled and no browser is saved for the user.

Attached a patch to fix the issue.

CommentFileSizeAuthor
tfa-notice-trusted-browsers.patch741 bytesayalon

Comments

ayalon created an issue. See original summary.

feng-shui’s picture

Version: 8.x-1.0-alpha4 » 8.x-1.0-alpha5
Status: Needs review » Reviewed & tested by the community

Patch fixes the issue, trusted browsers can still be added and removed.

jcnventura’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the review. Would be good to see if a few other reviewing this.

jcnventura’s picture

Status: Reviewed & tested by the community » Needs work

I wonder if it would not be simpler to:

return $this->getUserData('tfa', 'tfa_trusted_browser', $this->uid, $this->userData) ?: [];

  • jcnventura authored 864efe1 on 8.x-1.x
    Issue #3068084 by ayalon, jcnventura, Feng-Shui: Warning / Notice, if...
jcnventura’s picture

Status: Needs work » Fixed

Let's try my option.

feng-shui’s picture

Thanks for getting this in.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.