I am working with phpActiveRecord as my ORM. So when I query it spits out objects. My problem is when iterating over the objects with the code I run in some objects that are empty/null or otherwise useless, which throw an exception in the form of a "Notice", which I know "Notice" isn't a make a break error, but I don't like to leave that margin of error in my code. So now Im trying to figure out how I can check to see if something like
$this->object
is empty, null, or otherwise set. I've tried
if(!isset($this->object))
if(!empty($this->object))
if(trim($this->object)!=='')
which all break it seems as I'm trying to get a property of a non-object. Which would normally imply to me I am accessing an array over an object, but thats not the case as the same $this->object works for all the results where the object actually has data