Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11915 closed bug (wontfix)

buildParams fails tries to serialize obj functions

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


the buildParams funcion , called by $.ajax, fails when you pass an object that contains functions. For eg:

var data = {

myProp:"hello", fnc : function(){




$.post('url',{obj:data}, function(){});

it can be easily fixed by adding the following guard instruction:

function buildParams(prefix, obj, traditional, add) {

if (jQuery.type(obj) === "function") return;



Change History (1)

comment:1 Changed 11 years ago by Rick Waldron

Resolution: wontfix
Status: newclosed

Param objects should only contain serialization safe values - JSON doesn't allow functions and JSON rules are the rules to follow.

Note: See TracTickets for help on using tickets.