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
committerGitHub <noreply@github.com>2022-11-11 13:38:25 +0300
commite717bedc10f413421465c27632a1d6dc99503a7c (patch)
tree3f3572dc46ca0cc221646b43617a6375166b1601
parenta2c0f79efb38a32caf2398f0169f2eca9f6bb973 (diff)
Fix php 8.0 warning if db_dsnr is used (#8779)
-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 6f90cf04f..4de4f1f4a 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -290,9 +290,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;
+ }
}
}
}