Merge branch 'bug7531' of https://github.com/csnover/jquery into csnover-bug7531
[jquery.git] / src / ajax.js
index 61b9c43..d20ad76 100644 (file)
@@ -201,7 +201,7 @@ jQuery.extend({
                // toString fixes people passing a window.location or
                // document.location to $.ajax, which worked in 1.4.2 and
                // earlier (bug #7531). It should be removed in 1.5.
-               s.url = s.url.toString().replace( rhash, "" );
+               s.url = ("" + s.url).replace( rhash, "" );
 
                // Use original (not extended) context object if it was provided
                s.context = origSettings && origSettings.context != null ? origSettings.context : s;
@@ -264,7 +264,7 @@ jQuery.extend({
                        };
                }
 
-               if ( s.dataType === "script" && s.cache === null ) {
+               if ( s.dataType === "script" && s.cache === undefined ) {
                        s.cache = false;
                }