Skip to content

Commit

Permalink
Fix log creation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvandemaele authored Mar 16, 2022
1 parent 7c327bc commit 98aa272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Skeleton/Transaction/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static function get_last_successful() {
* Create log.
*/
public static function create(
\Transaction $transaction, bool $failed, string $output = '', ?\Exception $exception = null,
\Transaction $transaction, bool $failed, string $output = '', ?\Throwable $t = null,
?string $date = null
): self {

Expand All @@ -98,8 +98,8 @@ public static function create(
$log->failed = $failed;
$log->output = $output;

if (isset($exception) === true) {
$log->exception = print_r($exception, true);
if (isset($t) === true) {
$log->exception = print_r($t, true);
}

if ($date !== null) {
Expand Down

0 comments on commit 98aa272

Please sign in to comment.