Osclass Support Forums

Osclass plugin support => Osclass Pay Plugin => Topic started by: megacheb on October 01, 2019, 11:38:12 AM

Title: Fatal error: Uncaught ArgumentCountError: Too few arguments to function ...
Post by: megacheb on October 01, 2019, 11:38:12 AM
Hello
I receive this error when periodic bonus must be sent to user:
I use php 7.1

If i use php 7.0 a dont receive this error.
If i right understend this error display becouse in index.php (line 352) missed one argument $cart, which declared in model/ModelOSP.php:1934 ->(saveLog($concept, $code, $amount, $currency, $email, $user, $cart, $product_type, $source))

If i add null instead $cart to index.php (line 352) it will be correct?
Something like this:
Code: [Select]

ModelOSP::newInstance()->saveLog(sprintf(__('Periodical credits to user %s (%s) at %s', 'osclass_pay'), $u['s_name'], ($credit . osp_currency_symbol()), osc_page_title()), 'wallet_' . date('YmdHis'), $credit, osp_currency(), $u['s_email'], $u['pk_i_id'], NULL, OSP_TYPE_PACK, 'PERIODICAL');

Title: Re: Fatal error: Uncaught ArgumentCountError: Too few arguments to function ...
Post by: MB Themes on October 02, 2019, 08:01:18 AM
@megacheb
That seems to be correct approach ;)
Title: Re: Fatal error: Uncaught ArgumentCountError: Too few arguments to function ...
Post by: megacheb on October 02, 2019, 09:35:15 AM
Thanks for your reply