Skip to content

Commit

Permalink
Stop unwanted outputbuffing notice
Browse files Browse the repository at this point in the history
> If the function fails it generates an E_NOTICE.

prevent notice as this will break the error catching.
  • Loading branch information
bruce aldridge authored Jun 8, 2020
1 parent 7e51895 commit f33b7fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/TaskRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f33b7fb

Please sign in to comment.