Differential D18159 Diff 43687 src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | if ($type) { | ||||
$value); | $value); | ||||
$type->validateStoredValue($option, $value); | $type->validateStoredValue($option, $value); | ||||
} catch (PhabricatorConfigValidationException $ex) { | } catch (PhabricatorConfigValidationException $ex) { | ||||
throw new PhutilArgumentUsageException($ex->getMessage()); | throw new PhutilArgumentUsageException($ex->getMessage()); | ||||
} | } | ||||
} else { | } else { | ||||
$type = $option->getType(); | $type = $option->getType(); | ||||
switch ($type) { | switch ($type) { | ||||
case 'class': | |||||
$value = (string)$value; | |||||
break; | |||||
default: | default: | ||||
$value = json_decode($value, true); | $value = json_decode($value, true); | ||||
if (!is_array($value)) { | if (!is_array($value)) { | ||||
switch ($type) { | switch ($type) { | ||||
case 'set': | case 'set': | ||||
$command = csprintf( | $command = csprintf( | ||||
'./bin/config set %R %s', | './bin/config set %R %s', | ||||
$key, | $key, | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |