mirror of https://github.com/MISP/MISP
Merge branch 'develop' of github.com:MISP/MISP into develop
commit
4af6a4d1aa
|
@ -37,7 +37,11 @@ class CryptographicKey extends AppModel
|
|||
public function __construct($id = false, $table = null, $ds = null)
|
||||
{
|
||||
parent::__construct($id, $table, $ds);
|
||||
$this->gpg = GpgTool::initializeGpg();
|
||||
try {
|
||||
$this->gpg = GpgTool::initializeGpg();
|
||||
} catch (Exception $e) {
|
||||
$this->gpg = null;
|
||||
}
|
||||
$this->validate = [
|
||||
'type' => [
|
||||
'rule' => ['inList', $this->validTypes],
|
||||
|
|
|
@ -3,7 +3,7 @@ $distribution = Hash::extract($data, $field['path'])[0];
|
|||
$event_id_path = Hash::extract($data, $field['event_id_path'])[0];
|
||||
if ($distribution == 4) {
|
||||
try{
|
||||
$sg = Hash::extract($data, $field['path']);
|
||||
$sg = Hash::extract($data, $field['sg_path']);
|
||||
} catch (Exception $e) {
|
||||
$sg = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue