From 166f0deae90939f8fdd3187b7166586af71fb800 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 28 Oct 2022 21:46:34 +0200 Subject: [PATCH] [ticket/17010] Make get_form_tokens() parameters optional PHPBB3-17010 --- phpBB/phpbb/form/form_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/form/form_helper.php b/phpBB/phpbb/form/form_helper.php index ca4ca14b01..7a266f2339 100644 --- a/phpBB/phpbb/form/form_helper.php +++ b/phpBB/phpbb/form/form_helper.php @@ -46,13 +46,13 @@ class form_helper * Get form tokens for form * * @param string $form_name Name of form - * @param int $now Token generation time - * @param string $token_sid SID used for form token - * @param string $token Generated token + * @param int|null $now Token generation time + * @param string|null $token_sid SID used for form token + * @param string|null $token Generated token * * @return array Array containing form_token and creation_time of form token */ - public function get_form_tokens(string $form_name, int &$now = 0, string &$token_sid = '', string &$token = ''): array + public function get_form_tokens(string $form_name, ?int &$now = 0, ?string &$token_sid = '', ?string &$token = ''): array { $now = time(); $token_sid = ($this->user->data['user_id'] == ANONYMOUS && !empty($this->config['form_token_sid_guests'])) ? $this->user->session_id : '';