diff program/lib/Roundcube/rcube_db.php @ 19:b6a96bdd6b29

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Wed, 08 Oct 2025 08:50:44 -0400
parents abddb304201f
children
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_db.php	Tue Oct 07 11:20:40 2025 -0400
+++ b/program/lib/Roundcube/rcube_db.php	Wed Oct 08 08:50:44 2025 -0400
@@ -131,7 +131,7 @@
         $this->db_error_msg = null;
 
         // return existing handle
-        if ($this->dbhs[$mode]) {
+        if (!empty($this->dbhs[$mode])) {
             $this->dbh = $this->dbhs[$mode];
             $this->db_mode = $mode;
             return $this->dbh;
@@ -438,7 +438,7 @@
 
         if (count($params)) {
             while ($pos = strpos($query, '?', $pos)) {
-                if ($query[$pos+1] == '?') {  // skip escaped '?'
+	      if (($query[$pos+1]??null) == '?') {  // skip escaped '?'
                     $pos += 2;
                 }
                 else {