Skip to content

[メール] PHP7系でメール通知設定のUnion型エラーを修正しました#2233

Merged
masaton0216 merged 1 commit into
masterfrom
bug/fix-bucket-mail-union-type
Jul 22, 2025
Merged

[メール] PHP7系でメール通知設定のUnion型エラーを修正しました#2233
masaton0216 merged 1 commit into
masterfrom
bug/fix-bucket-mail-union-type

Conversation

@masaton0216

Copy link
Copy Markdown
Contributor

概要

PHP8のUnion型記法(string|null)がPHP7系で動作しないため、Nullable型記法(?string)に修正し、PHP7系との互換性を確保しました。

変更背景

  • Connect-CMSはPHP7.4以上をサポートしているが、PHP8のUnion型記法がPHP7系でエラーとなっていた
  • メール通知機能(ブログ等)でPHP7系環境において Fatal Error が発生していた

変更内容

  • app/Models/Common/BucketsMail.phpgetFormattedSubject メソッドの引数型を修正
    • 変更前: string|null $subject(PHP8のUnion型記法)
    • 変更後: ?string $subject(PHP7互換のNullable型記法)

レビュー完了希望日

特になし

関連Pull requests/Issues

#2225

参考

DB変更の有無

なし

チェックリスト

@masaton0216 masaton0216 self-assigned this Jul 22, 2025
@masaton0216 masaton0216 added the bug バグ・不具合連絡 label Jul 22, 2025
@masaton0216 masaton0216 merged commit 935b0f5 into master Jul 22, 2025
1 check passed
@masaton0216 masaton0216 deleted the bug/fix-bucket-mail-union-type branch July 22, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug バグ・不具合連絡

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant