mirror of https://github.com/MISP/MISP
fix: [internal] Throw NotFoundException for non exists UUID
parent
72928cd6a2
commit
477a102d80
|
@ -12,6 +12,9 @@ class ToolboxComponent extends Component
|
|||
'recursive' => -1,
|
||||
'fields' => array($model->alias . '.id')
|
||||
));
|
||||
if (empty($data)) {
|
||||
throw new NotFoundException(__('Invalid %s.', $model->alias));
|
||||
}
|
||||
return $data[$model->alias]['id'];
|
||||
} else {
|
||||
if (!is_numeric($id)) {
|
||||
|
|
Loading…
Reference in New Issue