Browse Source

Fix PHP8 warnings

pull/9596/head
Aleksander Machniak 2 years ago
parent
commit
5e2c85c9a1
  1. 2
      plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
  2. 2
      program/actions/contacts/search.php
  3. 6
      program/lib/Roundcube/rcube_imap.php

2
plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php

@ -3239,7 +3239,7 @@ class rcube_sieve_engine
// find common headers used in script, will be added to the list
// of available (predefined) headers (#1489271)
foreach ($this->script as $rule) {
foreach ((array) $rule['tests'] as $test) {
foreach ((array) ($rule['tests'] ?? []) as $test) {
if ($test['test'] == 'header') {
foreach ((array) $test['arg1'] as $header) {
$lc_header = strtolower($header);

2
program/actions/contacts/search.php

@ -107,7 +107,7 @@ class rcmail_action_contacts_search extends rcmail_action_contacts_index
// check if search fields are supported....
if (is_array($fields)) {
$cols = $source->coltypes[0] ? array_flip($source->coltypes) : $source->coltypes;
$cols = !empty($source->coltypes[0]) ? array_flip($source->coltypes) : $source->coltypes;
$supported = 0;
foreach ($fields as $f) {

6
program/lib/Roundcube/rcube_imap.php

@ -2441,9 +2441,9 @@ class rcube_imap extends rcube_storage
$o_part = new rcube_message_part;
$o_part->ctype_primary = $part_data['type'];
$o_part->ctype_secondary = $part_data['subtype'];
$o_part->encoding = $part_data['encoding'];
$o_part->charset = $part_data['charset'];
$o_part->size = $part_data['size'];
$o_part->encoding = $part_data['encoding'] ?? null;
$o_part->charset = $part_data['charset'] ?? null;
$o_part->size = $part_data['size'] ?? null;
}
$body = '';

Loading…
Cancel
Save