Trying to get property of non-object in i18n_langcode() (line 229 of i18n.module) and a bunch of other property of non-object notices Recent logs lies to me.





I even did a dpm($node-&gt;title); with devel and indeed it's there. 

I have like 6 pages of these notices that appear per page load. They are all different locations but they all have the same error type, property of non object. Has anyone experienced something like this? 



I don't think it's a hack, at least not a Core hack, cause Core has been updated several times. 

Ugh, soo strange. 



This is hard to debug, here is another example



As you can see, I created a variable $test = i18n_language()-&gt;language and xdebug tells me $test = "en" yet on line 230 it fails to get the value according to the log.
Finally solved this mystery. 

I was able to narrow it down to a bean block in the site's footer. Upon inspecting all of the bean's block display fields



Disabling this field fixed the issue. Where is it coming from? IDK yet. I will update once I know. Seems like custom module. 

Update

Yep, turns out Featurette image link is coming from a custom module. Notice the big error in line 24 and line 30.



More errors here, what a mess!