Meaning of "Can't use method return value in write context"
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context">Can&#39;t use method return value in write context</a>  </p>
</blockquote>



<p>I sometimes encountered this error <code>Can't use method return value in write context</code>. However, I don't know what does <code>WRITE CONTEXT</code> means in this sentence. Could someone tell me a little general explaination of it.</p>

<p>Thank you.</p>

<p>The code for this error if you want to refer to is on line <code>if(empty($this-&gt;loadUser()))</code> However just to clarify, I just want to find out the meaning of "write context":</p>

<pre><code>public function verify()
{
    if(empty($this-&gt;loadUser()))
        $this-&gt;addError('username','Incorrect username.');
    else
    {
        $user = $this-&gt;loadUser();
        $project = $this-&gt;loadProject($pid);

        $project-&gt;associateUserToProject($this-&gt;loadUser());
        $project-&gt;associateUserToRole($this-&gt;role, $this-&gt;user-&gt;id)

    }
}

public function loadUser() {
    return User::model()-&gt;findByAttributes(array('username'=&gt;$this-&gt;username));
}
</code></pre>
