You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the keys of args are all numeric, the keys are ignored and each element will be passed to callback as a positional argument, in order.
If any keys of args are strings, those elements will be passed to callback as named arguments, with the name given by the key.
The example should include some documentation to explain this issue that is very hard to track and debug when upgrading from php < 8.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: