mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Avoid "Undefined index" error in project.search API when project_customfieldstorage table has additional fields not requested
Summary: Do not trigger an "Undefined index" error in PhabricatorCustomFieldStorage when calling the `project.search` Conduit API without passing search parameters when the local project_customfieldstorage table has additional fields configured not requested in the API call. Closes T15688 Test Plan: See above; `curl -k -s -X GET http://phorge.localhost/api/project.search?api.token=api-xxxxxxxxxxxx | jq -r` for comparison Reviewers: O1 Blessed Committers, 20after4 Reviewed By: O1 Blessed Committers, 20after4 Subscribers: 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15688 Differential Revision: https://we.phorge.it/D25493
This commit is contained in:
parent
bd44ec833f
commit
2d997c3f10
1 changed files with 4 additions and 0 deletions
|
@ -80,6 +80,10 @@ abstract class PhabricatorCustomFieldStorage
|
|||
$object_phid = $row['objectPHID'];
|
||||
$value = $row['fieldValue'];
|
||||
|
||||
if (!isset($map[$index]) || !isset($map[$index][$object_phid])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = $map[$index][$object_phid];
|
||||
$result[$key] = $value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue