Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1702 closed defect (fixed)

setObjectCookie does not correctly remove stored variables with null values

Reported by: guest Owned by: alex
Priority: high Milestone:
Component: IO Version: 0.3
Keywords: setObjectCookie Cc:
Blocked By: Blocking:


When using setObjectCookie, any entry which has a null value should be deleted from the current cookie. This functionaly is currently broken because the value is not checked correctly. I think this is the necessary change:

In src/io/cookie.js:63

62:for(var prop in obj) { 63: if(prop == null) { 64: delete cookie[prop];

65: } else if(typeof obj[prop] == "string"
typeof obj[prop] == "number") {

66: cookie[prop] = obj[prop]; 67: } 68:}

Line 63 should read: 63: if(obj[prop] == null) {

Change History (3)

comment:1 Changed 15 years ago by alex

Milestone: 0.4.1
Status: newassigned

comment:2 Changed 15 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [6719]) style cleanups and a fix for incorrect deletion. Fixes #1702.

comment:3 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.