error_reporting(0) does indeed suppress the error but the program execution fails at that point.
Here is my code, I have an array of items <Item></Item> in my xml file, must of them have a tag <ItemModel></ItemModel> but some of them don't. So when I try and get the value of the ITemModel tag for items that don't have an ItemModel I get the following error.
Fatal error: Call to a member function on a non-object in Test.php on line 90
foreach($responseDoc->get_elements_by_tagname('Item') as $item)
$test = $item->get_elements_by_tagname('ItemModel');
$ItemModel = $test->get_content();