Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional parameter $bcc declared before required parameter $body is implicitly treated as a required parameter at /var/www/nextcloud/apps/mail/lib/Model/NewMessageData.php#120 #9654

Closed
dustbro opened this issue May 17, 2024 · 1 comment

Comments

@dustbro
Copy link

dustbro commented May 17, 2024

Steps to reproduce

public static function fromRequest(Account $account,
?string $to = null,
?string $cc = null,
?string $bcc = null,
string $subject,
string $body,
array $attachments = [],
bool $isHtml = true,
bool $requestMdn = false,
?int $smimeCertificateId = null,
bool $smimeSign = false,
bool $smimeEncrypt = false): NewMessageData {
$toList = AddressList::parse($to ?: '');
$ccList = AddressList::parse($cc ?: '');
$bccList = AddressList::parse($bcc ?: '');

            return new self(
                    $account,
                    $toList,
                    $ccList,
                    $bccList,
                    $subject,
                    $body,
                    $attachments,
                    $isHtml,
                    $requestMdn,
                    $smimeCertificateId,
                    $smimeSign,
                    $smimeEncrypt,
            );
    }

Expected behavior

optional parameters are declared after all required parameters

Actual behavior

optional parameters are declared before all required parameters

Mail app version

3.6.1

Mailserver or service

DirectNic

Operating system

Ubuntu 22.04

PHP engine version

Other

Web server

Apache (supported)

Database

MariaDB

Additional info

PHP 8.3.7

@joshtrichards
Copy link
Member

Fixed in #9526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants