Skip to content

Commit

Permalink
check if file exists first
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 8, 2017
1 parent aabfebe commit c8eafa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Scheduling/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c8eafa8

Please sign in to comment.