Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorprogger committed Sep 20, 2024
1 parent 9438b87 commit 3afb619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Message/AbstractEnvelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(MessageInterface $message)
}
$this->message = $message;

if (is_array($this->metadata[EnvelopeInterface::ENVELOPE_STACK_KEY])) {
if (isset($this->metadata[EnvelopeInterface::ENVELOPE_STACK_KEY]) && is_array($this->metadata[EnvelopeInterface::ENVELOPE_STACK_KEY])) {
$this->metadata[EnvelopeInterface::ENVELOPE_STACK_KEY] = array_merge(
$envelopes,
array_filter(
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/FailureHandling/FailureEnvelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public static function fromMessage(MessageInterface $message): self

protected function getEnvelopeMetadata(): array
{
return [self::FAILURE_META_KEY => ArrayHelper::merge($this->metadata[self::FAILURE_META_KEY], $this->failureMeta)];
return [self::FAILURE_META_KEY => ArrayHelper::merge($this->metadata[self::FAILURE_META_KEY] ?? [], $this->failureMeta)];
}
}

0 comments on commit 3afb619

Please sign in to comment.