mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17010] Make get_form_tokens() parameters optional
PHPBB3-17010
This commit is contained in:
parent
e177ee3750
commit
166f0deae9
1 changed files with 4 additions and 4 deletions
|
@ -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 : '';
|
||||
|
|
Loading…
Add table
Reference in a new issue