View Issue Details

IDProjectCategoryView StatusLast Update
0000705XMB1Bugspublic2024-04-15 04:35
Reporterflushedpancake Assigned Tomiqrogroove  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product Version1.9.8 SP2 
Target Version1.9.12.06Fixed in Version1.9.12.06 
Summary0000705: updateforumcount() Queries Threads Without Expecting an Empty Forum
DescriptionFatal error: Uncaught TypeError: dbstuff::escape_fast(): Argument 1 ($sql) must be of type string, null given, called in include/functions.inc.php on line 1410 and defined in db/mysqli.php:379
Stack trace:
0 include/functions.inc.php(1410): dbstuff->escape_fast(NULL)
1 topicadmin.php(358): updateforumcount(19)
2 {main} thrown in db/mysqli.php on line 379
Steps To Reproduce1) Have at least two forums, one must have only one thread.
2) Attempt to move the thread.
3) The error happens, the thread does successfully move, but the counters get messed up, so you need to run stuff in the ACP to fix it.
TagsNo tags attached.
MySQL Version
PHP Version
Web Server
Browser
Flags
Original Reporter
SVN Revision3043

Activities

miqrogroove

2024-04-11 10:45

administrator   ~0000485

This goes all the way back to v1.5 and none of the changes since then accounted for an empty forum. I think the reason nobody noticed it until now is because the variable types were never enforced before v1.9.12.03. The empty forum needs to be checked explicitly and the lastpost value forced to an empty string.

Issue History

Date Modified Username Field Change
2024-04-11 04:23 flushedpancake New Issue
2024-04-11 09:59 miqrogroove Status new => acknowledged
2024-04-11 09:59 miqrogroove Description Updated
2024-04-11 10:45 miqrogroove Severity crash => minor
2024-04-11 10:45 miqrogroove Status acknowledged => assigned
2024-04-11 10:45 miqrogroove Product Version => 1.9.8 SP2
2024-04-11 10:45 miqrogroove Target Version => 1.9.12.06
2024-04-11 10:45 miqrogroove Note Added: 0000485
2024-04-11 10:54 miqrogroove Reproducibility have not tried => sometimes
2024-04-11 10:54 miqrogroove Summary Fatal error when moving the last thread out of a forum => updateforumcount() Queries Threads Without Expecting an Empty Forum
2024-04-11 12:44 miqrogroove Assigned To => miqrogroove
2024-04-11 12:44 miqrogroove Status assigned => resolved
2024-04-11 12:44 miqrogroove Resolution open => fixed
2024-04-11 12:44 miqrogroove Fixed in Version => 1.9.12.06
2024-04-11 12:44 miqrogroove SVN Revision => 3043
2024-04-15 04:35 miqrogroove Status resolved => closed