Skip to content

Commit

Permalink
fix transaction creation on report exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ilvalerione committed May 20, 2024
1 parent 262fbec commit f3656e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Inspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,11 @@ public function reportException(\Throwable $exception, $handled = true)
*/
public function addEntries($entries)
{
$entries = is_array($entries) ? $entries : [$entries];
foreach ($entries as $entry) {
$this->transport->addEntry($entry);
if ($this->isRecording()) {
$entries = is_array($entries) ? $entries : [$entries];
foreach ($entries as $entry) {
$this->transport->addEntry($entry);
}
}
return $this;
}
Expand Down

0 comments on commit f3656e7

Please sign in to comment.