1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +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:
Andre Klapper 2023-12-18 12:45:13 +01:00
parent bd44ec833f
commit 2d997c3f10

View file

@ -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;
}