Invalid argument supplied for foreach()
<p>I have absolutely no idea what I'm doing wrong right now.  I think I'm mentally exhausted, because I'm utterly clueless.  Here's the code I'm using:</p>

<pre><code>if(empty($this-&gt;updates) || !is_array($this-&gt;updates))
    return null;

foreach($this-&gt;updates as $update)
</code></pre>

<p>This is failing.  HOWEVER, if I do a print_r($this->updates) before the foreach (and after), it works perfectly fine.  Why is it that when I try to use it in a foreach it pretends the array doesn't exist?</p>

<p>Sample print_r($this->updates):</p>

<pre><code>Array
(
    [0] = Array
    (
        [id] =&gt; 1 
        [name] =&gt; test
    ) 
    [1] = Array
    (
       [id] =&gt; 2 
       [name] =&gt; rawr
    )
)
</code></pre>
