title: mongodb $and expression must be a nonempty array
body: <p>I'm new to mongo and I'm getting an error. Both $user_id and $this->_id are non empty (valid mongo id). </p>
  
  
  
  <pre class="lang-php prettyprint-override"><code>$criteria = array( 
      '$and' =&gt; array( 
          array('parent_id' =&gt;$this-&gt;_id), 
          '$or' =&gt; array(
              array('user_id' =&gt; $user_id),
              array('from_user_id' =&gt; $user_id)
          )               
      ) 
  );
  </code></pre>
  
  <p>the error says</p>
  
  <pre class="lang-php prettyprint-override"><code>$and expression must be a nonempty array 
  </code></pre>
  
  <p>Any clue?</p>