Commit 0b50c4a0 authored by Daniel Stone's avatar Daniel Stone

Accept arrays in PHID custom-field validation

As setValueFromStorage() notes, we can accept either JSON strings or arrays for PHID-type custom fields. Handle this in decodeValue by passing through an array if we've received one.

Test Plan:
  - Add Maniphest custom field with PhabricatorPeopleDatasource
  - Create task with field filled
  - Go to Maniphest task detail view
  - Observe no errors in DarkConsole / PHP error log
parent f3aa48e7
......@@ -256,6 +256,10 @@ abstract class PhabricatorStandardCustomFieldPHIDs
}
protected function decodeValue($value) {
if (is_array($value)) {
return $value;
}
$value = json_decode($value);
if (!is_array($value)) {
$value = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment