Skip to content

Commit

Permalink
fix: php7.2以降では、get_classの引数にnullがあるとWarningが発生するため修正(退会通知等のメール通知処理)。
Browse files Browse the repository at this point in the history
  • Loading branch information
ryu818 committed Feb 8, 2021
1 parent 12d8c11 commit d0a085a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/UsersController.php
Expand Up @@ -254,7 +254,7 @@ public function delete() {
//メール通知の場合、NetCommonsMailUtilityをメンバー変数にセットする。Mockであれば、newをしない。
//テストでMockに差し替えが必要なための処理であるので、カバレッジレポートから除外する。
//@codeCoverageIgnoreStart
if (substr(get_class($this->mail), 0, 4) !== 'Mock') {
if (! isset($this->mail) || substr(get_class($this->mail), 0, 4) !== 'Mock') {
$this->mail = new NetCommonsMail();
}
//@codeCoverageIgnoreEnd
Expand Down

0 comments on commit d0a085a

Please sign in to comment.