Skip to content

Commit

Permalink
match with nette/application 3.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
natocTo committed Jan 6, 2022
1 parent d4618db commit ae2f58b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": "^7.2 || ^8.0",
"nette/application": "^3.1.4",
"nette/application": "^3.1.5",
"nette/utils": "^3.0"
},
"require-dev": {
Expand Down
8 changes: 4 additions & 4 deletions src/SecuredLinksControlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ trait SecuredLinksControlTrait
/**
* {@inheritdoc}
*/
public function link(string $destination, ...$args): string
public function link(string $destination, $args = []): string
{
$args = count($args) === 1 && is_array($args[0] ?? null)
? $args[0]
: $args;
$args = func_num_args() < 3 && is_array($args)
? $args
: array_slice(func_get_args(), 1);

$link = parent::link($destination, $args);
return $this->getPresenter()->createSecuredLink($this, $link, $destination);
Expand Down

0 comments on commit ae2f58b

Please sign in to comment.