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

Remove operation doesn't work on values that are null #2

Closed
ifeltsweet opened this issue Nov 3, 2014 · 1 comment
Closed

Remove operation doesn't work on values that are null #2

ifeltsweet opened this issue Nov 3, 2014 · 1 comment

Comments

@ifeltsweet
Copy link

Values that are set to null are not being removed by 'remove' operation. That is because of the check that goes into remove method

if (isset($json[$pointerPart]))

From PHP docs:

"isset() will return FALSE if testing a variable that has been set to NULL"

Easy fix:

if (isset($json[$pointerPart]) || is_null($json[$pointerPart]))

Too lazy to create a pull request, could you possibly fix this in the coming days? Cheers.

@raphaelstolt
Copy link
Owner

Will look into it over the weekend.

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