Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Steininger <11192306+codegain@users.noreply.github.com>2022-11-11 13:38:25 +0300
committerAleksander Machniak <alec@alec.pl>2022-11-11 13:39:09 +0300
commit278633b1501b02905bf9f5b2ba7e908592fbfed9 (patch)
tree20b0602cfba117f5ccc7eff7f5b60ad11eb1cc77
parent6e4d328841d082b68628e56dd15f80a6bc92a8f1 (diff)
Fix php 8.0 warning if db_dsnr is used (#8779)release-1.5
-rw-r--r--program/lib/Roundcube/rcube_db.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 4d4f6dcea..ee063c5c0 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -288,9 +288,11 @@ class rcube_db
}
else if ($mode == 'r') {
// connected to db with the same or "higher" mode for this table
- $db_mode = $this->table_connections[$table];
- if ($db_mode == 'w' && empty($this->options['dsnw_noread'])) {
- $mode = $db_mode;
+ if (isset($this->table_connections[$table])) {
+ $db_mode = $this->table_connections[$table];
+ if ($db_mode == 'w' && empty($this->options['dsnw_noread'])) {
+ $mode = $db_mode;
+ }
}
}
}