v1.6.1 Comprehensive Type Fix Summary
Nov 23, 2025
Issue:
- Convert $error to a string before using it in strpos() and sprintf()
- Automatically convert entity objects to arrays when passed to triggerEvent
Numeric values obtained from form input (unum filter), the database, or configuration are in string format.
Affected methods:
Fix strategy
- calculateFee(float $amount, ...)
- addTriggerData(..., float $amount)
- queueTransaction(..., float $amount)
- queueAlert(..., float $amount)
- queueUpdateUser(..., float $amount)
- $maxAmount, $event['amount'], balance comparisons, and similar values are all converted to float
- Ensure all mathematical operations use the correct numeric types
Immediately convert all amount values retrieved from form input to float
Convert all numeric values retrieved from arrays/configuration to float before use
Ensure all mathematical operations use numeric operands
Perform type conversion before passing values to methods that require float parameters
Convert database query results to float before mathematical comparisons
Results
User registration no longer throws TypeError
Credit purchases are now added correctly
Credit transfer functionality works properly
Credit exchange calculations are correct
Tipping and red packet features are stable
Daily check-in no longer causes errors
All event triggers are type-safe
Error logging works normally
Admin adjustment features are usable
Content purchase deductions are accurate
Delete the maximum number of points that a user can hold in the option;
The maximum holding limit of the user has been added to the points, and the maximum limit of each type of points is controlled separately, and after the upper limit is exceeded, the user will no longer trigger all the events that increase the points under this point.
We use essential cookies to make this site work, and optional cookies to enhance your experience.