Skip to content

Commit

Permalink
Merge pull request #7 from webinertia/phpunit-patch
Browse files Browse the repository at this point in the history
Fixes undefined array key warning when running
  • Loading branch information
tyrsson authored Jul 2, 2023
2 parents a5badbc + 5fc0046 commit a76a0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LogListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public function log(EventInterface $event)
}
if ($event instanceof MvcEvent) {
assert($event instanceof MvcEvent);
/** @var Exception $ex */
$ex = $params['exception'];
/** @var Exception|null $ex */
$ex = $params['exception'] ?? null;

if ($ex instanceof Throwable || $ex instanceof Exception) {
/**
Expand Down

0 comments on commit a76a0c8

Please sign in to comment.