Fix for crash when pushable project have unknown users

Apparently we've got Unknown Object (Phabricator User) in
translation project now.

Not sure how it became invalid, but automated scripts
better be robust for this.
This commit is contained in:
2013-11-27 22:14:07 +06:00
parent 5bda6bf48b
commit b1097e9c61
2 changed files with 6 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ function handleSingleUserPHID(
->setViewer($viewer)
->withPHIDs(array($userPHID))
->executeOne();
if (!$user) {
return;
}
$keys = id(new PhabricatorUserSSHKey())->loadAllWhere(
'userPHID = %s',

View File

@@ -17,6 +17,9 @@ function handleSingleUserPHID(
->setViewer($viewer)
->withPHIDs(array($userPHID))
->executeOne();
if (!$user) {
return;
}
$user_name = $user->getUserName();
if (!array_key_exists($user_name, $authfile)) {