ch-ricardor/nada

PHP 8.0 Deprecated Required parameter

Opened this issue · 0 comments

Deprecated: Required parameter $var_id follows optional parameter $file_id in /var/www/nada_5/application/models/Variable_model.php on line 153

Deprecated: Required parameter $repositoryid follows optional parameter $overwrite in /var/www/nada_5/application/libraries/Catalog_admin.php on line 249

https://php.watch/versions/8.0/deprecate-required-param-after-optional

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.