Skip to content

Commit

Permalink
Use the config value since the env is the source
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanThompson committed Jun 4, 2016
1 parent 2db89d3 commit d58cf22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Preference/Form/PreferenceFormFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function handle(PreferenceFormBuilder $builder, PreferenceRepositoryInter
* Disable the field if it
* has a set env value.
*/
if (isset($field['env']) && ($value = env($field['env'])) !== null) {
if (isset($field['env']) && isset($field['bind']) && env($field['env']) !== null) {
$field['disabled'] = true;
$field['value'] = $value;
$field['warning'] = 'module::message.env_locked';
$field['value'] = $this->config->get($field['bind']);
}
}

Expand Down

0 comments on commit d58cf22

Please sign in to comment.