Trying to get property of non-obJect Custom Module Notice: Trying to get property of non-object in speakerdetailblock_preprocess_block() (line 42
This error occurs when you are getting language from a non object. To fix this check that whether the node is a object and check that 'language' exists in the $node or not.

if(is_object($node) &amp;&amp; isset($node-&gt;language))


Then check the stuff that you are going to do.