[BR] Credits Points System

VIP Addons [BR] Credits Points System 1.6.2a

No permission to buy ($27.00)
- Improved stability for addons;
- Upgraded the interface for the board.
v1.6.1 Comprehensive Type Fix Summary

Nov 23, 2025

  • Convert $error to a string before using it in strpos() and sprintf()
  • Automatically convert entity objects to arrays when passed to triggerEvent
Issue:
Numeric values obtained from form input (unum filter), the database, or configuration are in string format.

Affected methods:
  • 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
Fix strategy
  • ✅ 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
Back
QR Code
Top Bottom