Relocate calls to func_get_args() to beginnings of functions

Created on 28 November 2018, over 5 years ago
Updated 16 January 2023, over 1 year ago

On account of the backwards-incompatible changes made in PHP 7.0, it's helpful to move any calls to func_get_arg() and func_get_args() to the start of the function (even when the original location was safe in practice), in order to reduce cognitive load for the reader.

Making this change can also eliminate warnings (sometimes false-positive) from certain code linters. e.g. "[Warning] Function argument(s) returned by "func_get_args" might have been modified."

Refer to https://secure.php.net/manual/en/migration70.incompatible.php#migration7...

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand jweowu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024