Bugfix and memory optimization
This patch fixes the missing check_auth function's $data argument, which caused the API answer to be incomplete (missing api_version
, api_source
, and endpoint
JSON fields) in case a wrong auth_token was supplied by the caller. The endpoint
field was therefore also missing in the logs.
Passing $data as a reference is now enforced in every function, which should reduce memory usage as the array is no longer copied at all within the script. The check_filename function's parameters order has also been changed, which puts $data first like any other function, and is now the convention.