MyBB Community Forums

Full Version: Urgent: Warning System Throwing SQL Errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm running a mybb forum on localhost and have setup quite the system; however, the warning system is super bugged right now.

The first and major bug is that it throws an SQL error if you try to ban a user with the warning system by stating that you didn't state a display group.

SQL Version: MySQLi 5.6.14
Mybb Version: 1.8.3
PHP Version: 5.6.3

Also, with my version of MySQL, most plugins I have to manually edit due to the use of null values for sid.

I also got an SQL error for length but I can't remember if it was for time of post suspension or for expiration time… Both choices were never/permanent
Perhaps it would be helpful if you posted the actual error messages..
Okay, Im uploading screenshots.
Ok, thanks. I can confirm both, they're caused by these incorrect assignments which should be 0 instead of empty string: https://github.com/mybb/mybb/blob/featur...s.php#L490
https://github.com/mybb/mybb/blob/featur...s.php#L232
But these errors will show up only when in MySQL strict mode AFAIK and I'm not sure how we treat issues connected with it, so I'll let someone else push it to github with a suitable priority.

Also, there are lots of redundant $db->escape_string()s (used on pure integers such as the displaygroup and usergroup).
They're fixed as MySQL 5.7 (and IIRC also MySQL 5.6) run in strict mode by default.
(2015-02-12, 11:01 AM)Jones H Wrote: [ -> ]They're fixed as MySQL 5.7 (and IIRC also MySQL 5.6) run in strict mode by default.

Not sure if I follow you, if MySQL 5.6/5.7 run in strict mode by default, why are these errors fixed? Isn't it the opposite thing?
I have no idea what mode mysql is in; while I don't have the most recent version, mine is fairly up to date.

Also, why do I seem to be one of the only people to ever have a problem with installing plugins…especially if the person fills each setting's sid with NULL -- that throws an error for null value when it expects non-null.

Also, when's the next update?
Meant we fix them because of that and threat them as normal errors.
Is the feature branch stable enough to use on a localhost forum?
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1831

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Pages: 1 2