mirror of https://github.com/MISP/MISP
chg: [internal] Log exceptions when doing diagnostics
parent
c920ca2c8a
commit
70f9f10e8b
|
@ -4165,12 +4165,13 @@ class Server extends AppModel
|
|||
private function checkRemoteVersion($HttpSocket)
|
||||
{
|
||||
try {
|
||||
$json_decoded_tags = GitTool::getLatestTags($HttpSocket);
|
||||
$tags = GitTool::getLatestTags($HttpSocket);
|
||||
} catch (Exception $e) {
|
||||
$this->logException('Could not retrieve latest tags from GitHub', $e, LOG_NOTICE);
|
||||
return false;
|
||||
}
|
||||
// find the latest version tag in the v[major].[minor].[hotfix] format
|
||||
foreach ($json_decoded_tags as $tag) {
|
||||
foreach ($tags as $tag) {
|
||||
if (preg_match('/^v[0-9]+\.[0-9]+\.[0-9]+$/', $tag['name'])) {
|
||||
return $this->checkVersion($tag['name']);
|
||||
}
|
||||
|
@ -4192,7 +4193,7 @@ class Server extends AppModel
|
|||
try {
|
||||
$latestCommit = GitTool::getLatestCommit($HttpSocket);
|
||||
} catch (Exception $e) {
|
||||
$latestCommit = false;
|
||||
$this->logException('Could not retrieve version from GitHub', $e, LOG_NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4212,6 +4213,7 @@ class Server extends AppModel
|
|||
try {
|
||||
return GitTool::currentBranch();
|
||||
} catch (Exception $e) {
|
||||
$this->logException('Could not retrieve current Git branch', $e, LOG_NOTICE);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue