Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [pgsql] SQL error if threads are moderated [C-StefanT]
#1
If new threads in a forum are moderated you get a sql error after submitting the form:
Quote:SQL Error:
0 - ERROR: invalid input syntax for integer: ""
Query:
SELECT replies,unapprovedposts,attachmentcount,attachmentcount FROM mybb_threads WHERE tid=''
Fix: Open inc/datahandlers/post.php and find:
update_thread_counters($thread['tid'], array("replies" => 0, "unapprovedposts" => 1));
Replace with:
update_thread_counters($this->tid, array("replies" => 0, "unapprovedposts" => 1));
Greets,
Michael
-------------
[Image: donation_drive_sig.png]


Messages In This Thread
[F] [pgsql] SQL error if threads are moderated [C-StefanT] - by Michael S. - 2009-04-20, 10:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)