Merge pull request #449 from corpsee/add-project-fix

Fixed key in add action when 'ssh-keygen' command is not available
This commit is contained in:
Dan Cryer 2014-06-13 13:52:20 +01:00
commit 31b1f047b2

View file

@ -166,9 +166,9 @@ class ProjectController extends \PHPCI\Controller
$sshKey = new SshKey();
$key = $sshKey->generate();
$values['key'] = $key['private_key'];
$values['pubkey'] = $key['public_key'];
$pub = $key['public_key'];
$values['key'] = $key ? $key['private_key'] : '';
$values['pubkey'] = $key ? $key['public_key'] : '';
$pub = $key ? $key['public_key'] : '';
}
$form = $this->projectForm($values);