Open luigif opened 1 year ago
Hi, This is correct. I'm using the latest version 2.0.6 with a code created 5 year ago and I faced this issue. Glad that someone solved it. It should be added to the next version release to not break old code compatibility. Thank you.
In PHP 8+ when processing requests using call_user_func_array (as in http://altorouter.com/usage/processing-requests.html)
a fatal error is generated if $match['params'] key values do not match with function $match['target'] parameters name.
A quick solution is to extract array values with:
since according to the manual page (https://www.php.net/manual/en/function.call-user-func-array.php):
The example should include some documentation to explain this issue that is very hard to track and debug when upgrading from php < 8.