From c8eafa8e6741dc5add4c5030aa7362744dcdab29 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 8 Mar 2017 07:30:29 -0600 Subject: [PATCH] check if file exists first --- src/Illuminate/Console/Scheduling/Event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php index ab3d53106691..98deb5d9f6c0 100644 --- a/src/Illuminate/Console/Scheduling/Event.php +++ b/src/Illuminate/Console/Scheduling/Event.php @@ -405,7 +405,7 @@ protected function ensureOutputIsBeingCapturedForEmail() */ protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false) { - $text = file_get_contents($this->output); + $text = file_exists($this->output) ? file_get_contents($this->output) : ''; if ($onlyIfOutputExists && empty($text)) { return;