mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
log failures to read certificates during listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
f82f5d05c3
commit
5fde58d4f0
1 changed files with 7 additions and 1 deletions
|
|
@ -92,8 +92,14 @@ class CertificateManager implements ICertificateManager {
|
|||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
try {
|
||||
$result[] = new Certificate($this->view->file_get_contents($path . $file), $file);
|
||||
$content = $this->view->file_get_contents($path . $file);
|
||||
if ($content !== false) {
|
||||
$result[] = new Certificate($content, $file);
|
||||
} else {
|
||||
$this->logger->error("Failed to read certificate from $path");
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error("Failed to read certificate from $path", ['exception' => $e]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue