-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Error when calling toArray
on revisions of an entry
#11454
Comments
Are you able to provide the full stack trace? |
Sure:
|
As I see it, the |
Yes, they'll get transformed into Does |
That's the difference though, Use the former if you can, it's always better to be dealing with real objects instead of arrays. From Laravel: |
And also why do you need the |
I wasn't aware if the difference between |
Yep, agreed. |
Bug description
Calling
$entry->revisions()->toArray()
causes an Error:pathinfo(): Argument #1 ($path) must be of type string, Statamic\Revisions\Revision given
Raying the result of

$entry->revisions()
yields:How to reproduce
Calling
$entry->revisions()->toArray()
on any revision-enabled entry with revisions.Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: