diff program/lib/Roundcube/rcube_washtml.php @ 27:c32b53434b47

more compensation for deprecated empty cases
author Charlie Root
date Sun, 18 Jan 2026 14:20:29 -0500
parents 303b85d5b561
children
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_washtml.php	Sat Oct 18 12:24:31 2025 -0400
+++ b/program/lib/Roundcube/rcube_washtml.php	Sun Jan 18 14:20:29 2026 -0500
@@ -214,10 +214,10 @@
      */
     public function __construct($p = array())
     {
-        $this->_html_elements   = array_flip((array)$p['html_elements']) + array_flip(self::$html_elements);
-        $this->_html_attribs    = array_flip((array)$p['html_attribs']??array()) + array_flip(self::$html_attribs);
-        $this->_ignore_elements = array_flip((array)$p['ignore_elements']??array()) + array_flip(self::$ignore_elements);
-        $this->_void_elements   = array_flip((array)$p['void_elements']??array()) + array_flip(self::$void_elements);
+      $this->_html_elements   = array_flip((array)($p['html_elements']??array())) + array_flip(self::$html_elements);
+      $this->_html_attribs    = array_flip((array)($p['html_attribs']??array())) + array_flip(self::$html_attribs);
+      $this->_ignore_elements = array_flip((array)($p['ignore_elements']??array())) + array_flip(self::$ignore_elements);
+      $this->_void_elements   = array_flip((array)($p['void_elements']??array())) + array_flip(self::$void_elements);
 
         unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['void_elements']);
 
@@ -367,8 +367,8 @@
     private function wash_uri($uri, $blocked_source = false)
     {
       if (!empty($this->config) &&
-	  (($src = $this->config['cid_map'][$uri])
-	   || ($src = $this->config['cid_map'][$this->config['base_url'].$uri]))
+	  (($src = ($this->config['cid_map'][$uri]??null)) ||
+	   ($src = ($this->config['cid_map'][$this->config['base_url'].$uri]??null)))
         ) {
             return $src;
         }
@@ -775,6 +775,7 @@
         $style  = trim($style);
         $strlen = strlen($style);
         $result = array();
+	$q = false;
 
         // explode value
         for ($p=$i=0; $i < $strlen; $i++) {