Skip to content

Commit

Permalink
Fix: Resolve "Cannot unpack array with string keys" issue in EmbedObject
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmal1yev committed Dec 10, 2024
1 parent 4828fa4 commit 47376d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Responses/Objects/EmbedObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ public function __construct(array $content)

public function cast(): EmbedInterface
{
$args = array_pop($this->content);

return EmbedFactory::make(
Arr::get($this->content, '$type'),
...array_pop($this->content)
...array_values($args)
);
}
}

0 comments on commit 47376d4

Please sign in to comment.