Opened 16 years ago

Closed 16 years ago

#1070 closed defect (fixed)

dojo.rpc.JsonService#parseResults checks value of result instead of presence of result [patch]

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


The parseResults method in JsonService? does not return the proper value when an integer of value zero is returned by the remote procedure. Instead of the value zero, a object of the form {result: 0, id: 1} is returned.

The parseResults method uses the following to determine if a result is present in order to return just that result (over the entire object):

    return obj["result"]||obj["Result"];

If the remote procedure returns the integer value zero, the following fails and the full object is returned.

Attachments (1)

JsonService.js.patch (527 bytes) - added by [email protected] 16 years ago.
patch that checks presence instead of value of result field.

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by [email protected]

Attachment: JsonService.js.patch added

patch that checks presence instead of value of result field.

comment:1 Changed 16 years ago by guest

Version: 0.20.3

comment:2 Changed 16 years ago by [email protected]

Also, I am employed by IBM ([email protected]…). I am told IBM has a CCLA on file.

comment:3 Changed 16 years ago by dylan

Resolution: fixed
Status: newclosed

merged in [4662], thanks for the patch.

Note: See TracTickets for help on using tickets.