I've had a look at this for a long time.
The line in question is
The most striking part is the mention of "stdClass". I can't see how this would ever happen in a stock install. If $posthandler wasn't set, then it should give a "call to a member function on a non-object" type error.
stdClass is a special PHP class, somewhat like the "default" class for objects without type. I strongly doubt anyone would deliberately create an object as stdClass, rather, perhaps it is the result of typecasting somewhere - which itself is a bit of a weird thing to do...
Ignoring the above, the actual code has some conditions around it:
Essentially, means that this is only accessible if previewing a post, and creating a new thread.
So it should be impossible to invoke that when trying to submit a new thread (unless you've somehow managed to set previewpost).
I can only think of this being caused by a (seemingly odd) plugin.