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
When declaring a function or a method, adding a required parameter after optional parameters is deprecated since PHP 8.0. If you have a require parameter (i.e. a parameter without a default value set in its signature) after an optional one (i.e. a parameter with a default value), it makes all parameters before it essentially required because the caller has to explicitly pass a value for optional parameters as well.
It is definitely best practice to put required params before optional ones, but with PHP8 also comes the ability to circumvent having to specify prior null args with named arguments
When declaring a function or a method, adding a required parameter after optional parameters is deprecated since PHP 8.0. If you have a require parameter (i.e. a parameter without a default value set in its signature) after an optional one (i.e. a parameter with a default value), it makes all parameters before it essentially required because the caller has to explicitly pass a value for optional parameters as well.
More information here: https://php.watch/versions/8.0/deprecate-required-param-after-optional
So far, I have seen this here... [ PHP 8.0.0, GS v3.4.0.9-alpha ]
$lang
follows optional$plugin
- /admin/inc/basic.php on line 1415$globali18n
follows optional$plugin
- /admin/inc/basic.php on line 1415$default
follows optional$var
- /admin/inc/basic.php on line 2504The text was updated successfully, but these errors were encountered: