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

DateTimeHandler::serializeDateTimeToJson() - Argument must be an instance of DateTime, null given #248

Closed
SchmidtClaudia opened this issue Dec 4, 2012 · 2 comments

Comments

@SchmidtClaudia
Copy link

Setting @type("DateTime") on a nullable entity property ends in a fatal error with the message "Catchable Fatal Error: Argument 2 passed to JMS\SerializerBundle\Serializer\Handler\DateTimeHandler::serializeDateTimeToJson() must be an instance of DateTime, null given in .../JMS/SerializerBundle/Serializer/Handler/DateTimeHandler.php line 67"

Catching it with setting parameter default to null it results in a fatal error on line 163 at GraphNavigator.

@schmittjoh
Copy link
Owner

Could you check which version of the serialize you are using?

On Tue, Dec 4, 2012 at 3:27 PM, archomedia [email protected] wrote:

Setting @type https://github.com/Type("DateTime") on a nullable entity
property ends in a fatal error with the message "Catchable Fatal Error:
Argument 2 passed to
JMS\SerializerBundle\Serializer\Handler\DateTimeHandler::serializeDateTimeToJson()
must be an instance of DateTime, null given in
.../JMS/SerializerBundle/Serializer/Handler/DateTimeHandler.php line 67"


Reply to this email directly or view it on GitHubhttps://github.com//issues/248.

@SchmidtClaudia
Copy link
Author

updating fixed the problem

thank you :)

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

No branches or pull requests

2 participants