[Fix] deprecated: Required parameter follows optional parameter

[Fix] deprecated: Required parameter follows optional parameter

This type of error occurs in PHP 8 and higher. This means if you have a function and an optional parameter comes first and then the required param – this deprecation message triggers. Example. Here $a is an optional parameter,