SimpleMachines / SMF

Simple Machines Forum — SMF in short — is free and open-source community forum software, delivering professional grade features in a package that allows you to set up your own online community within minutes!
https://www.simplemachines.org/
Other
592 stars 255 forks source link

[2.1]: Post count membergroup can be changed to "Private" but not the other way around #8324

Open LexArma opened 2 weeks ago

LexArma commented 2 weeks ago

Basic Information

You can modify a post count group making it private, which can be handy - But you should also be able to reverse this, yet currently trying apparently errors out.

Steps to reproduce

Admin > Members > Membergroups. Modify post count group to Private - works. Modify back to Post Based, fails.

Expected result

The change should work both way, or it shouldn't be possible to begin with.

Actual result

Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/ManageMembergroups.php:740 Stack trace: #0 /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/ManageMembergroups.php(740): abs() #1 /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/Subs.php(6030): EditMembergroup() #2 /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/ManageMembergroups.php(66): call_helper() #3 /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/Admin.php(499): ModifyMembergroups() #4 /home/thekrash/domains/thekrashsite.com/public_html/smf21core/index.php(184): AdminMain() #5 {main} thrown in /home/thekrash/domains/thekrashsite.com/public_html/smf21core/Sources/ManageMembergroups.php on line 740

Version/Git revision

2.1.4

Database Engine

All

Database Version

No response

PHP Version

No response

Logs

No response

Additional Information

Report here by Sir Osis https://www.simplemachines.org/community/index.php?topic=589982

live627 commented 2 weeks ago

spam removed

Oldiesmann commented 1 week ago

I would think you shouldn't be able to change it at all. If they want to make it a regular group instead they can delete the post count group and make a new one.

LexArma commented 1 week ago

Yeah, that does seem like a sensible solution - if it breaks stuff, don't allow it in the first place.

Oldiesmann commented 6 days ago

@live627 Can you kill that spam?

live627 commented 6 days ago

lol lex got it