diff --git a/src/TaskRunner.php b/src/TaskRunner.php index 8ff9204..5aa6e2a 100644 --- a/src/TaskRunner.php +++ b/src/TaskRunner.php @@ -140,8 +140,12 @@ public function handleError(\Exception $exception) $tx->rollBack(); } - $output = ob_get_contents(); - ob_end_clean(); + $output = ''; + + if(ob_get_length() > 0) { + $output = ob_get_contents(); + ob_end_clean(); + } $this->error = true; $this->log($output);