I would think the following piece of code should work, but it doesn't (Edited: Now works in PHP 5.5+):
if (!empty($r->getError()))
Where getError()
is simply:
public function getError()
{
return $this->error;
}
Yet I end up with this error:
can't use method return value in write context
What does this mean? Isn't this just a read?
转载于:https://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context