SMF icon indicating copy to clipboard operation
SMF copied to clipboard

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

Open LexArma opened this issue 1 year ago • 5 comments

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

LexArma avatar Oct 13 '24 06:10 LexArma

spam removed

live627 avatar Oct 15 '24 02:10 live627

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.

Oldiesmann avatar Oct 23 '24 02:10 Oldiesmann

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

LexArma avatar Oct 23 '24 04:10 LexArma

@live627 Can you kill that spam?

Oldiesmann avatar Oct 25 '24 03:10 Oldiesmann

lol lex got it

live627 avatar Oct 25 '24 03:10 live627

I couldn't reproduce this against 2.1. But I can against 3.0. I sent up a change for 2.1 regardless though.

jdarwood007 avatar Jul 03 '25 03:07 jdarwood007