title: jQuery 1.4.4+ AJAX request - post empty array or object becomes string
body: <p>I have a object in Javascript that I am trying to AJAX POST to a PHP script. Everything worked in jQuery 1.4.1 but now in 1.4.4 or above all empty arrays or empty objects arrive as a string(0) which is incorrect.</p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>$(document).ready(function() {
  var obj = {};
  obj.one = [];
  obj.two = {};
  obj.three = [];
  obj.three.push('one');
  obj.three.push('two');
  obj.three.push('three');
  obj.four = "onetwothree";
  
  $.ajax({
      type: 'POST',
      url: 'ajax.php',
      data: obj,
      success: function(data) {
          alert(data);
      },
  });
  });
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>&lt;?php
  var_dump($_POST);
  ?&gt;
  </code></pre>
  
  <p><strong>RESPONSE:</strong></p>
  
  <pre><code>array(4) {
    ["one"]=&gt; string(0) ""
    ["two"]=&gt; string(0) ""
    ["three"]=&gt; array(3) {
      [0]=&gt; string(3) "one"
      [1]=&gt; string(3) "two"
      [2]=&gt; string(5) "three"
    }
    ["four"]=&gt; string(11) "onetwothree"
  }
  </code></pre>
  
  <p>In version 1.4.1 it would just NOT send ["one"] or ["two"], but now in the newer versions, the fact that it arrives as a string throws off the whole application. Is there anything I can do so that an empty array ([]) arrives in PHP as an empty array ([]) and same with JavaScript objects?</p>