Skip to content

Commit

Permalink
Payload from exceptions fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaratsky committed Mar 10, 2016
1 parent 203a8ed commit 0cc3186
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ErrorHandlerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ private function getPayloadData(\Exception $exception)
if ($exception instanceof WithPayload) {
$exceptionData = $exception->rollbarPayload();
if (is_array($exceptionData)) {
$payloadData = ArrayHelper::merge($exceptionData, $payloadData);
if (is_null($payloadData)) {
$payloadData = $exceptionData;
} else {
$payloadData = ArrayHelper::merge($exceptionData, $payloadData);
}
} elseif (!is_null($exceptionData)) {
throw new \Exception(get_class($exception) . '::rollbarPayload() returns an incorrect result');
}
Expand Down

0 comments on commit 0cc3186

Please sign in to comment.