nightflyza / Ubilling

Ubilling is opensource ISP billing system based on stargazer
https://ubilling.net.ua
GNU General Public License v2.0
134 stars 105 forks source link

Update sc.php #782

Closed OlegBalakhnin closed 1 year ago

OlegBalakhnin commented 1 year ago

Fix Warning: A non-numeric value encountered in /usr/local/www/apache24/data/billing/api/libs/api.fundsflow.php on line 230

nightflyza commented 1 year ago

Warning: A non-numeric value encountered in /usr/local/www/apache24/data/billing/api/libs/api.fundsflow.php on line 230

what?

zb_CashAdd($userLogin, '-0' . $creditFee, 'add', $creditCashType, 'SCFEE');

what?!

OlegBalakhnin commented 1 year ago

zb_CashAdd($userLogin, **'-'** . $creditFee, 'add', $creditCashType, 'SCFEE'); writes a non-numeric value to the base where a numeric value is expected. Leads to warnings in addcach and pl _fundsflow modules. Should be replaced by zb_CashAdd($userLogin, **'0'** . $creditFee, 'add', $creditCashType, 'SCFEE'); or zb_CashAdd($userLogin, **'-0'** . $creditFee, 'add', $creditCashType, 'SCFEE'); as in the personal account credit module.

nightflyza commented 1 year ago

writes a non-numeric value to the base where a numeric value is expected.

Writing non numeric cash(!) values is unexpected in normal world.

Leads to warnings in addcach and pl _fundsflow modules.

Read the changelog for few last month. You trying to "fix" already non existent issue in non existent version of software.

zb_CashAdd($userLogin, '-0' . $creditFee, 'add', $creditCashType, 'SCFEE');

I wish I never saw it. Concatenate -0 as a string(?) to a known wrong value is "solultion"? Seriously? =)