Page MenuHomePhorge

D5847.1775175376.diff
No OneTemporary

Authored By
Unknown
Size
4 KB
Referenced Files
None
Subscribers
None

D5847.1775175376.diff

diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php
--- a/plugins/kolab_files/lib/kolab_files_engine.php
+++ b/plugins/kolab_files/lib/kolab_files_engine.php
@@ -1016,7 +1016,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$quota = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get quota. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get quota. Status: $status");
}
} catch (Exception $e) {
rcube::raise_error($e, true, false);
@@ -1118,7 +1118,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$_SESSION['kolab_files_caps'] = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get capabilities. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get capabilities. Status: $status");
}
} catch (Exception $e) {
rcube::raise_error($e, true, false);
@@ -1425,7 +1425,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$files[] = $attach_name;
} else {
- throw new Exception($body['reason'] ?: "Failed to post file_upload. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to post file_upload. Status: $status");
}
} catch (Exception $e) {
unlink($path);
@@ -1515,7 +1515,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$file_params = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get file_info. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get file_info. Status: $status");
}
} catch (Exception $e) {
$errors[] = $e->getMessage();
@@ -1707,7 +1707,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$this->file_data = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get file_info. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get file_info. Status: $status");
}
} catch (Exception $e) {
rcube::raise_error(
@@ -1779,7 +1779,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$this->mimetypes = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get mimetypes. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get mimetypes. Status: $status");
}
}
@@ -1840,7 +1840,7 @@
if ($status == 200 && $body['status'] == 'OK') {
$sources = $body['result'];
} else {
- throw new Exception($body['reason'] ?: "Failed to get folder_types. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get folder_types. Status: $status");
}
} catch (Exception $e) {
rcube::raise_error($e, true, false);
@@ -1870,7 +1870,7 @@
} elseif ($body['code'] == 530) {
return false;
} else {
- throw new Exception($body['reason'] ?: "Failed to get sharing form information. Status: $status");
+ throw new Exception(!empty($body['reason']) ? $body['reason'] : "Failed to get sharing form information. Status: $status");
}
} catch (Exception $e) {
rcube::raise_error($e, true, false);

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 12:16 AM (20 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18821662
Default Alt Text
D5847.1775175376.diff (4 KB)

Event Timeline