mirror of
https://github.com/nextcloud/server.git
synced 2026-02-26 03:11:28 -05:00
[BUGFIX] throw exception instead of error if unable to create file handler (only exceptions are catch)
Signed-off-by: Jan Messer <jan@mtec-studios.ch>
This commit is contained in:
parent
c6945666ca
commit
662dcfffd6
1 changed files with 4 additions and 0 deletions
|
|
@ -147,6 +147,10 @@ class CertificateManager implements ICertificateManager {
|
|||
$tmpPath = $certPath . '.tmp' . $this->random->generate(10, ISecureRandom::CHAR_DIGITS);
|
||||
$fhCerts = $this->view->fopen($tmpPath, 'w');
|
||||
|
||||
if (!is_resource($fhCerts)) {
|
||||
throw new \RuntimeException('Unable to open file handler to create certificate bundle "' . $tmpPath . '".');
|
||||
}
|
||||
|
||||
// Write user certificates
|
||||
foreach ($certs as $cert) {
|
||||
$file = $path . '/uploads/' . $cert->getName();
|
||||
|
|
|
|||
Loading…
Reference in a new issue