Skip to content

Commit

Permalink
Fix PHP8 warnings (#9242)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Dec 9, 2023
1 parent 98ac6e0 commit 104a992
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- Enigma: Fix finding of a private key when decrypting a message using GnuPG v2.3
- Fix page jump menu flickering on click (#9196)
- Update to TinyMCE 5.10.9 security release (#9228)
- Fix PHP8 warnings (#9235, #9238)
- Fix PHP8 warnings (#9235, #9238, #9242)
- Fix saving other encryption settings besides enigma's (#9240)
- Fix unneeded php command use in installto.sh and deluser.sh scripts (#9237)

Expand Down
3 changes: 2 additions & 1 deletion program/include/rcmail_attachment_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ public function __construct()
if (!empty($uid)) {
$rcube->config->set('prefer_html', true);
$this->message = new rcube_message($uid, null, !empty($_GET['_safe']));
$this->part = $this->message->mime_parts[$part_id] ?? null;

if ($this->part = $this->message->mime_parts[$part_id]) {
if ($this->part) {
$this->filename = rcmail_action_mail_index::attachment_name($this->part);
$this->mimetype = $this->part->mimetype;
$this->size = $this->part->size;
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ function tnef_decode(&$part)
$tpart->ctype_secondary = trim(strtolower($winatt['subtype']));
$tpart->mimetype = $tpart->ctype_primary . '/' . $tpart->ctype_secondary;
$tpart->mime_id = 'winmail.' . $part->mime_id . '.' . $pid;
$tpart->size = $winatt['size'];
$tpart->size = $winatt['size'] ?? 0;
$tpart->body = $winatt['stream'];

if (!empty($winatt['content-id'])) {
Expand Down

0 comments on commit 104a992

Please sign in to comment.