Error: preg_match_all(): Unknown modifier 'g'

Error: preg_match_all(): Unknown modifier 'g'
This commit is contained in:
dominiquefournier 2021-03-04 15:20:05 +01:00 committed by GitHub
parent a528c93d47
commit ea1ce46f2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,7 +210,7 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
}
}
$c = 0;
$re = [ '/[^0-9A-Za-z]+/g', '/[0-9]+/g', '/[A-Z]+/g', '/[a-z]+/g' ];
$re = [ '/[^0-9A-Za-z]+/', '/[0-9]+/', '/[A-Z]+/', '/[a-z]+/' ];
foreach ($re as $regex) {
if (\preg_match_all($regex, $sPassword, $m)) {
++$c;