Fixed key in add action when 'ssh-keygen' command is not available

This commit is contained in:
Corpsee 2014-05-26 08:55:32 +07:00
parent 8469628f7d
commit fcec8b2c8b

View file

@ -159,9 +159,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);