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

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Wed, 08 Oct 2025 08:50:44 -0400
parents 4681f974d28b
children 303b85d5b561
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_text2html.php	Tue Oct 07 11:20:40 2025 -0400
+++ b/program/lib/Roundcube/rcube_text2html.php	Wed Oct 08 08:50:44 2025 -0400
@@ -66,6 +66,13 @@
         'nobr_end'   => '</span>',
     );
 
+    /**
+     * Indicates whether content in the $text variable has been converted yet.
+     *
+     * @var boolean $_converted
+     * @see $html, $text
+     */
+    protected $_converted = false;
 
     /**
      * Constructor.
@@ -174,7 +181,7 @@
                 $text[$n] = substr($text[$n], 1);
             }
 
-            if ($text[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $text[$n], $regs)) {
+            if ($text[$n] && $text[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $text[$n], $regs)) {
                 $q        = substr_count($regs[0], '>');
                 $text[$n] = substr($text[$n], strlen($regs[0]));
                 $text[$n] = $this->_convert_line($text[$n], $flowed || $this->config['wrap']);