8000 Add support of \DateTimeInterface in setContentFields by clem · Pull Request #109 · bolt/forms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support of \DateTimeInterface in setContentFields #109

New issue
8000

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

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Add support of \DateTimeInterface in setContentFields #109

merged 1 commit into from
Nov 22, 2022

Conversation

clem
Copy link
Contributor
@clem clem commented Nov 21, 2022

When a field has a $value typed as \DateTimeInterface, the string conversion at line 98 throws an error as this class does not have a __toString() method. Converting this \DateTimeInterface to Carbon fixes this issue.

@nestordedios
Copy link
Contributor

Hi @clem !

Thanks for opening this Pull Request.

Is this working on your end? I think you are missing a use statement of the Carbon class.

@clem
Copy link
Contributor Author
clem commented Nov 21, 2022

I think you're right, @nestordedios! I didn't copied the modified file, I just added the block and I totally forgot it! 😅

Thank you, I'll update it now!

When a field has a `$value` typed as `\DateTimeInterface`, the string conversion at line 98 throws an error as this class does not have a `__toString()` method. Converting this `\DateTimeInterface` to `Carbon` fixes this issue.
Copy link
Contributor
@nestordedios nestordedios left a comment

Choose a reason for hiding this comment

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

Thanks @clem ! This looks good now. 🚀

@nestordedios nestordedios merged commit 78c1047 into bolt:master Nov 22, 2022
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
0