Skip to content

Commit e62aa8c

Browse files
committed
Cannot use object of type stdClass as array
1 parent 23288de commit e62aa8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Discord/Parts/Interactions/Request/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected function getComponentsAttribute(): ?ExCollectionInterface
9494
$components = Collection::for(Component::class, null);
9595

9696
foreach ($this->attributes['components'] ?? [] as $component) {
97-
$componentType = $component['type'] ?? 0;
97+
$componentType = $component->type ?? 0;
9898
$components->pushItem(
9999
$this->createOf(
100100
isset(ComponentBuilder::TYPE_CLASSES[$componentType])

0 commit comments

Comments
 (0)