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

Property was not cast if was defined as nullable. #1623

Merged
merged 2 commits into from
Dec 30, 2018

Conversation

nowackipawel
Copy link
Contributor

@nowackipawel nowackipawel commented Dec 22, 2018

If property was defined as nullable i.e.: ?array, ?json, ?json-array then it was not cast .

Solution 1: add all cases with '?' at the beginning to switch.
Solution 2: change type if null was not returned at the beginning of castAs method. - i've picked this one.

nowackipawel and others added 2 commits December 22, 2018 12:44
If property was defined as @nullable i.e.: `?array, ?json, ?json-array` then it was not cast  .

Solution 1: add all cases with '?' at the beginning to switch.
Solution 2: change type if null was not returned at the beginning of castAs method. - i've picked this one.
@lonnieezell lonnieezell merged commit b5b4ad3 into codeigniter4:develop Dec 30, 2018
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