-
-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle ObjectConstructor returning NULL
The DeserializationGraphNavigator calls the construct method on an instance of ObjectConstructorInterface. According to the return type hint of that method, it is allowed to return NULL. However, when this occurs, the navigator will pass NULL to the startVisitingObject method of the visitor. startVisitingObject expects an object to be passed in, thus causing the serializer to crash with a type error. We can prevent this error by calling the `visitNull` method if we detect that the ObjectConstructor has returned NULL instead of an object.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters