Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Fix attributes returning a collection instead of an array #654

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Conversation

kailumworkhouse
Copy link

Following on from statamic/cms#11333

Fix implemented through runway.

@@ -17,7 +17,7 @@ protected function extractFromFields(Model $model, Resource $resource, Blueprint
$fields = $blueprint
->fields()
->setParent($model)
->addValues($values->all())
->addValues($values->toArray())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to provide some more context about the issue you're running into and why this fixes it? Changing ->all() to ->toArray() may impact performance.

@duncanmcclean duncanmcclean changed the title [7.x] Fix attributes returning a collection instead of an array [78x] Fix attributes returning a collection instead of an array Feb 7, 2025
@duncanmcclean duncanmcclean changed the title [78x] Fix attributes returning a collection instead of an array [8.x] Fix attributes returning a collection instead of an array Feb 7, 2025
@duncanmcclean duncanmcclean changed the base branch from 7.x to 8.x February 7, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants