Commits

Anonymous committed d3e70d2

Deal with parameters that might be "falsy" in logic checks but are supposed to be passed anyways (such as 0). Fixes #12239 !strict

Comments (0)

Files changed (1)

 	//		This object was developed against the Netflix API (OAuth-based service); see
 	//		http://developer.netflix.com for more details.
 	var encode = this.encode = function(s){
-		if(!s){ return ""; }
+		if(!("" + s).length){ return ""; }
 		return encodeURIComponent(s)
 			.replace(/\!/g, "%21")
 			.replace(/\*/g, "%2A")
 
 		//	encode.
 		var s = dojo.map(a, function(item){
-			return encode(item[0]) + "=" + encode(item[1]||"");
+			return encode(item[0]) + "=" + encode((""+item[1]).length ? item[1] : "");
 		}).join("&");
 
 		var baseString = method.toUpperCase()