Skip to content

Commit c8eafa8

Browse files
committed
check if file exists first
1 parent aabfebe commit c8eafa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Console/Scheduling/Event.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ protected function ensureOutputIsBeingCapturedForEmail()
405405
*/
406406
protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false)
407407
{
408-
$text = file_get_contents($this->output);
408+
$text = file_exists($this->output) ? file_get_contents($this->output) : '';
409409

410410
if ($onlyIfOutputExists && empty($text)) {
411411
return;

0 commit comments

Comments
 (0)