Hello flynax team and all,
As i got some errors in PHP 7.1 which was not in PHP <=7.0, i was encouraged to find the problem.
The error is something like this:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function ...
I got this error at some programs like:
rlPayment.class.php:
Code:
Only registered members can view the code.
when it does not pass enough parameters to upgradeBanner function in rlBanners.class.php
OR in flydroid apk, add listing module, it unables to load screen. I guess the problem is the same like above.
OR in Multifield plugin admin panel:
multi_formats.inc.php:
Code:
Only registered members can view the code.
and
Code:
Only registered members can view the code.
It passes few parameters to the corresponding functions from rlMultifield.class.php
Or maybe in some other places that i don't know.
But, what the problem is. According PHP formal document
previously, a warning would be emitted for invoking user-defined functions with too few arguments. Now, this warning has been promoted to an Error exception.
Example:
PHP Code:
Only registered members can view the code.
Output in PHP 7.1:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in %s on line %d and exactly 1 expected in %s:%d
But, solution is one of belows:
1. Using default value for missed parametrs in target function. like
Code:
Only registered members can view the code.
2. Pass all parametrs to the target function. like
Code:
Only registered members can view the code.
3. Using
Code:
Only registered members can view the code.
method, like
Code:
Only registered members can view the code.
But, since it is an error message (Fatal error) you probably needs to use Throwable instead of Exception like this:
Code:
Only registered members can view the code.
So, it seems flynax is not ready for PHP 7.1 yet.