mirror of https://github.com/MISP/MISP
fix: Check if the taxonomy directory contains the machinetag.json file before trying to read it, fixes MISP/misp-taxonomies#45
parent
f87747ace2
commit
8e80bb47ff
|
@ -43,6 +43,9 @@ class Taxonomy extends AppModel {
|
|||
}
|
||||
$updated = array();
|
||||
foreach ($directories as $dir) {
|
||||
if (!file_exists(APP . 'files' . DS . 'taxonomies' . DS . $dir . DS . 'machinetag.json')) {
|
||||
continue;
|
||||
}
|
||||
$file = new File(APP . 'files' . DS . 'taxonomies' . DS . $dir . DS . 'machinetag.json');
|
||||
$vocab = json_decode($file->read(), true);
|
||||
$file->close();
|
||||
|
|
Loading…
Reference in New Issue