From e757674c18a80a5bcdbcd031b35177b1e82eeb2d Mon Sep 17 00:00:00 2001 From: horus Date: Thu, 17 Nov 2022 21:32:52 +0100 Subject: Don't send emails when there is nothing to report --- app/Console/Commands/SaveStats.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/Console/Commands') diff --git a/app/Console/Commands/SaveStats.php b/app/Console/Commands/SaveStats.php index 8af214b..b1b83b9 100644 --- a/app/Console/Commands/SaveStats.php +++ b/app/Console/Commands/SaveStats.php @@ -37,8 +37,12 @@ class SaveStats extends Command ob_end_clean(); if ( $ok ) { - $this->info( $msg ); - return Command::SUCCESS; + if ( "" != $msg ) { + $this->info( $msg ); + return Command::FAILURE; // Hack to force output + } else { + return Command::SUCCESS; + } } $this->error( "Failure happened:\n" ); -- cgit v1.2.3