Differential D18165 Diff 43710 src/applications/config/controller/PhabricatorConfigEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigEditController.php
Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | if ($type) { | ||||
$canonical_value = $type->newValueFromRequestValue( | $canonical_value = $type->newValueFromRequestValue( | ||||
$option, | $option, | ||||
$value); | $value); | ||||
$type->validateStoredValue($option, $canonical_value); | $type->validateStoredValue($option, $canonical_value); | ||||
$xaction = $type->newTransaction($option, $canonical_value); | $xaction = $type->newTransaction($option, $canonical_value); | ||||
} catch (PhabricatorConfigValidationException $ex) { | } catch (PhabricatorConfigValidationException $ex) { | ||||
$errors[] = $ex->getMessage(); | $errors[] = $ex->getMessage(); | ||||
$xaction = null; | $xaction = null; | ||||
} catch (Exception $ex) { | |||||
// NOTE: Some older validators throw bare exceptions. Purely in good | |||||
// taste, it would be nice to convert these at some point. | |||||
$errors[] = $ex->getMessage(); | |||||
$xaction = null; | |||||
} | } | ||||
return array( | return array( | ||||
$errors ? pht('Invalid') : null, | $errors ? pht('Invalid') : null, | ||||
$errors, | $errors, | ||||
$value, | $value, | ||||
$xaction, | $xaction, | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |