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

Recover from null authors in commit parsing

Summary:
Fixes T5445. Some import tools and other unusual situations can leave repositories with commits that don't have authors. This fails on insert.

Instead, explicitly cast the value to a string.

Test Plan: I didn't build a local repro, but see task/GitHub.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5445

Differential Revision: https://secure.phabricator.com/D9684
This commit is contained in:
epriestley 2014-06-23 07:23:42 -07:00
parent 19ff097d78
commit 40fa4799a3

View file

@ -17,7 +17,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
$data = new PhabricatorRepositoryCommitData();
}
$data->setCommitID($commit->getID());
$data->setAuthorName($author);
$data->setAuthorName((string)$author);
$data->setCommitDetail(
'authorPHID',
$this->resolveUserPHID($commit, $author));