Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_vcard.php @ 25:bea5a38be938
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Sat, 18 Oct 2025 12:24:31 -0400 |
| parents | 303b85d5b561 |
| children | c32b53434b47 |
comparison
equal
deleted
inserted
replaced
| 24:e53add5ddac5 | 25:bea5a38be938 |
|---|---|
| 645 $field = strtoupper($regs2[1][0]); | 645 $field = strtoupper($regs2[1][0]); |
| 646 $enc = null; | 646 $enc = null; |
| 647 | 647 |
| 648 foreach ($regs2[1] as $attrid => $attr) { | 648 foreach ($regs2[1] as $attrid => $attr) { |
| 649 $attr = preg_replace('/[\s\t\n\r\0\x0B]/', '', $attr); | 649 $attr = preg_replace('/[\s\t\n\r\0\x0B]/', '', $attr); |
| 650 if ((list($key, $value) = explode('=', $attr)) && $value) { | 650 if ((@list($key, $value) = explode('=', $attr)) && $value) { |
| 651 if ($key == 'ENCODING') { | 651 if ($key == 'ENCODING') { |
| 652 $value = strtoupper($value); | 652 $value = strtoupper($value); |
| 653 // add next line(s) to value string if QP line end detected | 653 // add next line(s) to value string if QP line end detected |
| 654 if ($value == 'QUOTED-PRINTABLE') { | 654 if ($value == 'QUOTED-PRINTABLE') { |
| 655 while (preg_match('/=$/', $lines[$i])) { | 655 while (preg_match('/=$/', $lines[$i])) { |
| 658 } | 658 } |
| 659 $enc = $value == 'BASE64' ? 'B' : $value; | 659 $enc = $value == 'BASE64' ? 'B' : $value; |
| 660 } | 660 } |
| 661 else { | 661 else { |
| 662 $lc_key = strtolower($key); | 662 $lc_key = strtolower($key); |
| 663 $entry[$lc_key] = array_merge((array)$entry[$lc_key], (array)self::vcard_unquote($value, ',')); | 663 $entry[$lc_key] = array_merge((array)($entry[$lc_key]??null), (array)self::vcard_unquote($value, ',')); |
| 664 } | 664 } |
| 665 } | 665 } |
| 666 else if ($attrid > 0) { | 666 else if ($attrid > 0) { |
| 667 $entry[strtolower($key)] = true; // true means attr without =value | 667 $entry[strtolower($key)] = true; // true means attr without =value |
| 668 } | 668 } |
