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:
parent
a9e2e51b98
commit
ad4a497355
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue