diff options
author | Michael Steininger <11192306+codegain@users.noreply.github.com> | 2022-11-11 13:38:25 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2022-11-11 13:38:57 +0300 |
commit | f3d0f1c2c307659ddc630a3f675686e16de42436 (patch) | |
tree | bc09c1d3055f0102ecf025b421d9ddf3ddc13d7d | |
parent | 1881b1e8ac9808e6c2e8d33f3e712fd2420042e1 (diff) |
Fix php 8.0 warning if db_dsnr is used (#8779)
-rw-r--r-- | program/lib/Roundcube/rcube_db.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 2ed915981..1aa259fdf 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -294,9 +294,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; + } } } } |