comparison program/lib/Roundcube/rcube_text2html.php @ 22:303b85d5b561

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Wed, 15 Oct 2025 14:06:27 -0400
parents b6a96bdd6b29
children c32b53434b47
comparison
equal deleted inserted replaced
21:73124dd49283 22:303b85d5b561
247 // colorize signature (up to <sig_max_lines> lines) 247 // colorize signature (up to <sig_max_lines> lines)
248 $len = strlen($text); 248 $len = strlen($text);
249 $sig_sep = "--" . $this->config['space'] . "\n"; 249 $sig_sep = "--" . $this->config['space'] . "\n";
250 $sig_max_lines = rcube::get_instance()->config->get('sig_max_lines', 15); 250 $sig_max_lines = rcube::get_instance()->config->get('sig_max_lines', 15);
251 251
252 while (($sp = strrpos($text, $sig_sep, $sp ? -$len+$sp-1 : 0)) !== false) { 252 while (($sp = strrpos($text, $sig_sep, isset($sp) ? -$len+$sp-1 : 0)) !== false) {
253 if ($sp == 0 || $text[$sp-1] == "\n") { 253 if ($sp == 0 || $text[$sp-1] == "\n") {
254 // do not touch blocks with more that X lines 254 // do not touch blocks with more that X lines
255 if (substr_count($text, "\n", $sp) < $sig_max_lines) { 255 if (substr_count($text, "\n", $sp) < $sig_max_lines) {
256 $text = substr($text, 0, max(0, $sp)) 256 $text = substr($text, 0, max(0, $sp))
257 .'<span class="sig">'.substr($text, $sp).'</span>'; 257 .'<span class="sig">'.substr($text, $sp).'</span>';