From e40b4921727267a7f443ac4478d7dc2a77bcf9ce Mon Sep 17 00:00:00 2001 From: anvmn Date: Mon, 12 Aug 2024 14:39:35 +0300 Subject: [PATCH 1/2] Acoid dynamic properties (for PHP 8 support) --- plugins/rate_limit/RestfulRateLimitManager.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/rate_limit/RestfulRateLimitManager.php b/plugins/rate_limit/RestfulRateLimitManager.php index 5d7f88ea..9c5e50ac 100644 --- a/plugins/rate_limit/RestfulRateLimitManager.php +++ b/plugins/rate_limit/RestfulRateLimitManager.php @@ -21,6 +21,13 @@ class RestfulRateLimitManager extends \RestfulPluginBase { */ protected $resource; + /** + * @var array + * + * The plugin info. + */ + protected $pluginInfo; + /** * Set the account. * From 97242a63c9c1e07be253b814778a2df1963093e6 Mon Sep 17 00:00:00 2001 From: anvmn Date: Mon, 12 Aug 2024 16:36:11 +0300 Subject: [PATCH 2/2] Make first param required, since second param is, and first is never used as optional --- .../plugins/authentication/RestfulAuthenticationToken.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/restful_token_auth/plugins/authentication/RestfulAuthenticationToken.class.php b/modules/restful_token_auth/plugins/authentication/RestfulAuthenticationToken.class.php index 9240f438..7660b8fd 100644 --- a/modules/restful_token_auth/plugins/authentication/RestfulAuthenticationToken.class.php +++ b/modules/restful_token_auth/plugins/authentication/RestfulAuthenticationToken.class.php @@ -17,7 +17,7 @@ class RestfulAuthenticationToken extends \RestfulAuthenticationBase { * @return string * The token from the request or FALSE if token isn't exists. */ - protected function extractTokenFromRequest(array $request = array(), $param_name) { + protected function extractTokenFromRequest(array $request, $param_name) { $key_name = !empty($param_name) ? $param_name : 'access_token'; $dashed_key_name = str_replace('_', '-', $key_name);