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

Enable differential.find handle empty input.

Summary:
return empty array when the query input is empty.

Test Plan:
send empty input.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen
CC: tuomaspelkonen
Differential Revision: 167
This commit is contained in:
jungejason 2011-04-26 21:59:44 -07:00 committed by jungejason
parent a9e2e51b98
commit ad4a497355

View file

@ -51,12 +51,16 @@ class ConduitAPI_differential_find_Method extends ConduitAPIMethod {
$query = $request->getValue('query');
$guids = $request->getValue('guids');
$results = array();
if (!$guids) {
return $results;
}
$revisions = id(new DifferentialRevisionListData(
$query,
(array)$guids))
->loadRevisions();
$results = array();
foreach ($revisions as $revision) {
$diff = $revision->loadActiveDiff();
if (!$diff) {