1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Fix more "msort()" vs "msortv()" callsites

Summary:
See <https://discourse.phabricator-community.org/t/unhandled-exception-when-logging-in-with-mfa/2828>. The recent changes to turn `msort()` on a vector an error have smoked out a few more of these mistakes.

These cases do not meaningfully rely on sort stability so there's no real bug being fixed, but we'd still prefer `msortv()`.

Test Plan: Viewed MFA and External Account settings panels. Did a `git grep 'msort(' | grep -i vector` for any more obvious callsites, but none turned up.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20587
This commit is contained in:
epriestley 2019-06-18 07:27:57 -07:00
parent 731b45d818
commit 1dd62f79ce
3 changed files with 3 additions and 3 deletions

View file

@ -485,7 +485,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
// change the order of prompts for users, but the alternative is that the // change the order of prompts for users, but the alternative is that the
// Settings panel order disagrees with the prompt order, which seems more // Settings panel order disagrees with the prompt order, which seems more
// disruptive. // disruptive.
$factors = msort($factors, 'newSortVector'); $factors = msortv($factors, 'newSortVector');
// If the account has no associated multi-factor auth, just issue a token // If the account has no associated multi-factor auth, just issue a token
// without putting the session into high security mode. This is generally // without putting the session into high security mode. This is generally

View file

@ -94,7 +94,7 @@ final class PhabricatorExternalAccountsSettingsPanel
->setViewer($viewer) ->setViewer($viewer)
->withIsEnabled(true) ->withIsEnabled(true)
->execute(); ->execute();
$configs = msort($configs, 'getSortVector'); $configs = msortv($configs, 'getSortVector');
$account_map = mgroup($accounts, 'getProviderConfigPHID'); $account_map = mgroup($accounts, 'getProviderConfigPHID');

View file

@ -54,7 +54,7 @@ final class PhabricatorMultiFactorSettingsPanel
->setViewer($viewer) ->setViewer($viewer)
->withUserPHIDs(array($user->getPHID())) ->withUserPHIDs(array($user->getPHID()))
->execute(); ->execute();
$factors = msort($factors, 'newSortVector'); $factors = msortv($factors, 'newSortVector');
$rows = array(); $rows = array();
$rowc = array(); $rowc = array();