JSON serializer fails on null #356

Closed
kurtpayne opened this Issue Aug 29, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@kurtpayne
Contributor

kurtpayne commented Aug 29, 2011

In IE8, when jsonSerialize() is called with a null value, an error is returned: 'length' is null or not an object.

How to reproduce:

x = null;
y = jsonSerialize(x);

The patch I'm using checks for null and undefined before doing any other checks / conversions:
http://pastebin.com/ztXYs52x

@jacobwgillespie

This comment has been minimized.

Show comment
Hide comment
@jacobwgillespie

jacobwgillespie Aug 29, 2011

Bump. This is a key issue and would be nice to fix as Plupload is now being used in WordPress as per the GSoC 2011 changes to the file uploader.

Bump. This is a key issue and would be nice to fix as Plupload is now being used in WordPress as per the GSoC 2011 changes to the file uploader.

kurtpayne added a commit to kurtpayne/plupload that referenced this issue Aug 29, 2011

@jayarjo

This comment has been minimized.

Show comment
Hide comment
@jayarjo

jayarjo Sep 7, 2011

Contributor

@jacobwg woa...

Contributor

jayarjo commented Sep 7, 2011

@jacobwg woa...

jayarjo added a commit that referenced this issue Sep 7, 2011

Merge pull request #358 from kurtpayne/patch-1
Fix for issue #356 - JSON serializer fails on null

@jayarjo jayarjo closed this Sep 7, 2011

@jacobwgillespie

This comment has been minimized.

Show comment
Hide comment
@jacobwgillespie

jacobwgillespie Sep 7, 2011

Not sure what the woa was about, but I hope my comment wasn't taken the wrong way...

Thanks for fixing the issue! Plupload is a solid library and was really great to work with this past summer.

Keep up the great work!

Not sure what the woa was about, but I hope my comment wasn't taken the wrong way...

Thanks for fixing the issue! Plupload is a solid library and was really great to work with this past summer.

Keep up the great work!

@jayarjo

This comment has been minimized.

Show comment
Hide comment
@jayarjo

jayarjo Sep 7, 2011

Contributor

@jacobwg sorry, for expressing it in a wrong way maybe. Didn't mean anything bad, was a bit of surprise for me. I knew there were some plans for a while, but didn't know that it has been included into the trunk already.

Contributor

jayarjo commented Sep 7, 2011

@jacobwg sorry, for expressing it in a wrong way maybe. Didn't mean anything bad, was a bit of surprise for me. I knew there were some plans for a while, but didn't know that it has been included into the trunk already.

@jacobwgillespie

This comment has been minimized.

Show comment
Hide comment
@jacobwgillespie

jacobwgillespie Sep 7, 2011

@jayarjo no problem! I was hoping I hadn't offended you or anything. :)

Yeah, integrating Plupload into WordPress was my project this past summer for Google Summer of Code - it went VERY smoothly and is now included in trunk. We're really liking the ability to do pre-upload in-browser image resizing now!

@jayarjo no problem! I was hoping I hadn't offended you or anything. :)

Yeah, integrating Plupload into WordPress was my project this past summer for Google Summer of Code - it went VERY smoothly and is now included in trunk. We're really liking the ability to do pre-upload in-browser image resizing now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment