summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php4
-rw-r--r--program/include/rcube_imap_generic.php5
2 files changed, 7 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 5dd9c1250..66b5c4bd6 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2222,6 +2222,10 @@ class rcube_imap extends rcube_storage
$folder = $this->folder;
}
+ if (!$this->check_connection()) {
+ return false;
+ }
+
// make sure folder exists
if ($this->folder_exists($folder)) {
if ($is_file) {
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 915a11aad..c3cfabc3a 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2538,7 +2538,7 @@ class rcube_imap_generic
{
unset($this->data['APPENDUID']);
- if (!$mailbox) {
+ if ($mailbox === null || $mailbox === '') {
return false;
}
@@ -2603,7 +2603,7 @@ class rcube_imap_generic
{
unset($this->data['APPENDUID']);
- if (!$mailbox) {
+ if ($mailbox === null || $mailbox === '') {
return false;
}
@@ -2612,6 +2612,7 @@ class rcube_imap_generic
if (file_exists(realpath($path))) {
$in_fp = fopen($path, 'r');
}
+
if (!$in_fp) {
$this->setError(self::ERROR_UNKNOWN, "Couldn't open $path for reading");
return false;