Skip to content

Commit

Permalink
Fix PHP8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jul 12, 2023
1 parent f40550f commit eaef7b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 5 additions & 5 deletions program/lib/Roundcube/rcube_imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2448,11 +2448,11 @@ public function get_message_part($uid, $part = 1, $o_part = null, $print = null,
$part_data = rcube_imap_generic::getStructurePartData($structure, $part);

$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->ctype_primary = $part_data['type'] ?? null;
$o_part->ctype_secondary = $part_data['subtype'] ?? null;
$o_part->encoding = $part_data['encoding'] ?? null;
$o_part->charset = $part_data['charset'] ?? null;
$o_part->size = $part_data['size'] ?? 0;
}

$body = '';
Expand Down
12 changes: 9 additions & 3 deletions program/lib/Roundcube/rcube_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1625,9 +1625,15 @@ private function _ldap2result($rec)

// determine record type
if ($this->is_group_entry($rec)) {
$out['_type'] = 'group';
$out['readonly'] = true;
$fieldmap['name'] = $this->group_data['name_attr'] ?: $this->prop['groups']['name_attr'];
$out['_type'] = 'group';
$out['readonly'] = true;

if (!empty($this->group_data['name_attr'])) {
$fieldmap['name'] = $this->group_data['name_attr'];
}
else {
$fieldmap['name'] = $this->prop['groups']['name_attr'];
}
}

// assign object type from object class mapping
Expand Down

0 comments on commit eaef7b3

Please sign in to comment.