fixed PHP 5.1 incompatibility introduced with commit 9644465b

This commit is contained in:
following
2013-03-25 13:22:41 +01:00
parent 7c668cfdd4
commit c885454fec

View File

@@ -70,12 +70,12 @@ function cracklib_checkpw($pw, $addwords)
// $pw may not contain one of $addwords[]
foreach ($wordlist AS $v)
if (mb_stripos($pw_lc, $v) !== false)
if (mb_strpos($pw_lc, $v) !== false)
return false;
// one of $addwords[] may not contain $pw
foreach ($wordlist AS $v)
if (mb_stripos($v, $pw_lc) !== false)
if (mb_strpos($v, $pw_lc) !== false)
return false;
// words from pw library are not allowed