Post
Topic
Board Meta
Re: Negative Sendable Merits. A bug?
by
Ivystar5
on 30/05/2025, 18:38:39 UTC
Can anyone find the bug? This function worked for years, but then I did something very far away (i.e. I didn't change this function at all) which broke it.

This is the only error I could spot in the code you posted

        $sendableUserMerit -= $excessSent;
     

While the solution was to be

        $sendableUserMerit = max(0, $sendableUserMerit - $excessSent);