mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
160c937dc2
Because array_unique() preserves keys, the $factors can go from:
[
0 => 'password',
1 => 'totp',
2 => 'totp',
3 => 'email'
]
to:
[
0 => 'password',
1 => 'totp',
3 => 'email'
]
and because this is not an array list, the validation fails.
Using array_values() after array_unique() will reset the keys to be sequential, resulting in:
[
0 => 'password',
1 => 'totp',
2 => 'email'
]