[eluser]mflammia[/eluser]
Hi,
Im trying to test in my view against objects that may not be present to check or uncheck radio buttons, with something like the below:
Code:
if (isset($person)){
echo 'first if';
if ($person->first_name == '1')
echo 'second if';
{echo "checked=\"yes\"";
}
}
I get the following error:
Code:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
I beleive I am testing the present of the object with the isset function correctly so no sure why its still erroring. I put in a couple of echos within the if's to see if they test true but neither message echos? - Sure its a newbie error but any pointers would be much appreciated, thanks.