mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Bugfix for #325 and log errors
This commit is contained in:
parent
334d3918c5
commit
e53e21857e
1 changed files with 8 additions and 1 deletions
|
|
@ -444,6 +444,9 @@ class GPG
|
|||
}
|
||||
}
|
||||
if (!$fingerprint) {
|
||||
if (!empty($result['errors'])) {
|
||||
\SnappyMail\Log::error('GPG', \implode("\n\t", $result['errors']));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -486,7 +489,7 @@ class GPG
|
|||
$result = $this->exec($arguments);
|
||||
|
||||
foreach ($result['status'] as $line) {
|
||||
if (\strpos($line, 'IMPORT_RES')) {
|
||||
if (false !== \strpos($line, 'IMPORT_RES')) {
|
||||
$line = \explode(' ', \explode('IMPORT_RES ', $line)[1]);
|
||||
return [
|
||||
'imported' => (int) $line[2],
|
||||
|
|
@ -502,6 +505,10 @@ class GPG
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($result['errors'][0])) {
|
||||
\SnappyMail\Log::warning('GPG', $result['errors'][0]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue