Mercurial > hg > rc2
comparison program/lib/Roundcube/html.php @ 16:1866b439e6d3
Slowly cleaning up more php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Mon, 06 Oct 2025 10:34:51 -0400 |
| parents | aff04b06b685 |
| children | b6a96bdd6b29 |
comparison
equal
deleted
inserted
replaced
| 15:85a746e95663 | 16:1866b439e6d3 |
|---|---|
| 75 if (is_string($attrib)) { | 75 if (is_string($attrib)) { |
| 76 $attrib = array('class' => $attrib); | 76 $attrib = array('class' => $attrib); |
| 77 } | 77 } |
| 78 | 78 |
| 79 $inline_tags = array('a','span','img'); | 79 $inline_tags = array('a','span','img'); |
| 80 $suffix = $attrib['nl'] || ($content && $attrib['nl'] !== false && !in_array($tagname, $inline_tags)) ? "\n" : ''; | 80 $suffix = ($attrib['nl']??null) || ($content && ($attrib['nl']??false) !== false && !in_array($tagname, $inline_tags)) ? "\n" : ''; |
| 81 | 81 |
| 82 $tagname = self::$lc_tags ? strtolower($tagname) : $tagname; | 82 $tagname = self::$lc_tags ? strtolower($tagname) : $tagname; |
| 83 if (isset($content) || in_array($tagname, self::$containers)) { | 83 if (isset($content) || in_array($tagname, self::$containers)) { |
| 84 $suffix = $attrib['noclose'] ? $suffix : '</' . $tagname . '>' . $suffix; | 84 $suffix = ($attrib['noclose']??null) ? $suffix : '</' . $tagname . '>' . $suffix; |
| 85 unset($attrib['noclose'], $attrib['nl']); | 85 unset($attrib['noclose'], $attrib['nl']); |
| 86 return '<' . $tagname . self::attrib_string($attrib, $allowed) . '>' . $content . $suffix; | 86 return '<' . $tagname . self::attrib_string($attrib, $allowed) . '>' . $content . $suffix; |
| 87 } | 87 } |
| 88 else { | 88 else { |
| 89 return '<' . $tagname . self::attrib_string($attrib, $allowed) . '>' . $suffix; | 89 return '<' . $tagname . self::attrib_string($attrib, $allowed) . '>' . $suffix; |
