While i'm creating a topic, i forgot to enter title and tdescription and i previewed the post. Next time when i entered all details and hit preview or post, i got this error:
Fatal error: Call to undefined method stdClass::verify_subject() in /home/diken/public_html/forum/inc/xthreads/xt_updatehooks.php on line 435
if we miss subject and try to update.
The error looks genuine, but could you explain a bit more exactly how you managed to reproduce it? That is, starting from what thread fields to add, including their settings etc.
If you could, that would be great.
Thanks.
I had installed the "xthreads thread description" plugin.
Later i tried to create new thread and didnt gave the thread name and description,
just filled the body and hit the preview button.
The error arised at that time saying
Fatal error: Call to undefined method stdClass::verify_subject() in /home/diken/public_html/forum/inc/xthreads/xt_updatehooks.php on line 435
Next, i'm unable to post it or preview it, even though i filled the thread name and description.
I refreshed the page and started posting freshly. Then it allowed me to post that thread.
I've had a look at this for a long time.
The line in question is
PHP Code:
$posthandler->verify_subject();
|
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:
PHP Code:
if($mybb->input['previewpost'] || $editpost) {
...
if($editpost || empty($errors)) {
...
} else {
...
$posthandler->verify_subject();
|
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.