Closed oscarssanchez closed 1 year ago
@oscarssanchez I noticed this on another site and discovered the mbstring extension wasn't installed on the environment, which was causing the issue. It looks like the PHP dependency Zxcvbn relies on this extension. That dependency is used to determine the password strength, so if we were to change out the method to one that doesn't use mbstring, it would resolve the issue. Otherwise, we'll need to indicate that the plugin reliesd on the mbstring PHP extension.
cc @tlovett1
Can't we just check if that function exists and, if not, bail on that functionality?
@tlovett1 Checking for a mbstring function sounds like a good short-term approach to prevent the error. The downside is the 10up Exp strong password functionality won't work on websites that don't have the mbstring PHP extension installed so that would be good to have documented so the dependencies are understood .
Yea, definitely needs to be documented but I feel like 90%+ websites have that extension. Can you put together a PR?
We are experiencing a fatal error while trying to reset a password after updating the site to PHP8. Here's what the log says:
"NOTICE: PHP message: PHP Parse error: syntax error, unexpected token
"match", expecting variable in
/var/www/html/client/public/wp-content/plugins/10up-experience/vendor/bjeavons/zxcvbn-php/src/Matcher.php
on line 92"
This seems to have been resolved via #98, so closing this issue.
Describe the bug
It looks like resetting the password can trigger a fatal error sometimes. Pasting the output of the error log:
Steps to Reproduce
Expected behavior
Password reset should not trigger the error
Screenshots
Environment information
Site Health Info:
Additional context