diff --git a/web/modules/custom/os2forms_email_handler/src/Plugin/WebformHandler/OS2FormsEmailWebformHandler.php b/web/modules/custom/os2forms_email_handler/src/Plugin/WebformHandler/OS2FormsEmailWebformHandler.php index 321cf68e..38d8b13d 100644 --- a/web/modules/custom/os2forms_email_handler/src/Plugin/WebformHandler/OS2FormsEmailWebformHandler.php +++ b/web/modules/custom/os2forms_email_handler/src/Plugin/WebformHandler/OS2FormsEmailWebformHandler.php @@ -74,9 +74,7 @@ public function sendMessage(WebformSubmissionInterface $webform_submission, arra * Whether file size threshold was surpassed or not. */ private function handleAttachmentNotification(WebformSubmissionInterface $webform_submission, array $message, string $emails): bool { - $isFileSizeThresholdSurpassed = $this->isAttachmentFileSizeThresholdSurpassed($webform_submission); - - if ($isFileSizeThresholdSurpassed) { + if ($isFileSizeThresholdSurpassed = $this->isAttachmentFileSizeThresholdSurpassed($webform_submission)) { $this->sendFileSizeNotification($webform_submission, $message, $emails); }