From 73adc4c859fee05bc06707b9b68e305454dd590d Mon Sep 17 00:00:00 2001 From: Anja Leichsenring <aleichsenring@ab-softlab.de> Date: Thu, 5 Mar 2020 20:22:05 +0100 Subject: [PATCH] [BUGFIX] Provide return value for SendEmailCommand The parent class defines a return value of type int, but the command does not provide one. This causes a test failure after latest dependency update of codeception version 4. Resolves: #90651 Releases: master Change-Id: Iecb1f3aa95feee6a0276ad1a0660999523490a53 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63556 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Richard Haeser <richard@maxserv.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Richard Haeser <richard@maxserv.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> --- typo3/sysext/core/Classes/Command/SendEmailCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/core/Classes/Command/SendEmailCommand.php b/typo3/sysext/core/Classes/Command/SendEmailCommand.php index 33a18f0dd1b3..aeaa845f4497 100644 --- a/typo3/sysext/core/Classes/Command/SendEmailCommand.php +++ b/typo3/sysext/core/Classes/Command/SendEmailCommand.php @@ -52,7 +52,7 @@ class SendEmailCommand extends Command * * @param InputInterface $input * @param OutputInterface $output - * @return int|void|null + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { @@ -74,9 +74,11 @@ class SendEmailCommand extends Command } $sent = $transport->flushQueue($mailer->getRealTransport()); $io->comment($sent . ' emails sent'); - } else { - $io->error('The Mailer Transport is not set to "spool".'); + return 0; } + $io->error('The Mailer Transport is not set to "spool".'); + + return 1; } /** -- GitLab