PHP isset only working with print_r, echo... but not on its own
<p>I'm about to punch PHP in the nads. I've got an incredibly simple operation that is basically acting with a mind of it's own.</p>

<pre><code>$this-&gt;user = $this-&gt;processToken($token);

if(!isset($this-&gt;user))
{
    $this-&gt;sendError(401);
}
</code></pre>

<p>w/ a valid $token this sends a 401, which it shouldn't. But this:</p>

<pre><code>$this-&gt;user = $this-&gt;processToken($token);

print_r($this-&gt;user);

if(!isset($this-&gt;user))
{
    $this-&gt;sendError(401);
}
</code></pre>

<p>works without a hitch, except for the fact that I now have an array printed out on the screen. <code>$user</code> is a VO, replacing <code>print_r(...)</code> with <code>echo $this-&gt;user-&gt;name</code> has the produces the same result (sans array of course).</p>

<p><strong>EDIT:</strong>
I should add, the operation after this returns an incremented int. Which even when the error is sent still increments (as long as the token is correct). So it does look like the header is overriding the end result. I would have thought the if would prevent the header from getting written though?</p>

<p><strong>UPDATE</strong>
To make things weirder. If I <code>echo '';</code> in the same place, it doesn't override anything, and the error still gets displayed.... again, even with good token.</p>
