Skip to content

Commit

Permalink
sync with nette/application 3.1.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
forgie1 committed Oct 9, 2021
1 parent f284c86 commit 33dc44f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/SecuredLinksControlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ trait SecuredLinksControlTrait
/**
* {@inheritdoc}
*/
public function link(string $destination, $args = []): string
public function link(string $destination, ...$args): string
{
if (!is_array($args)) {
$args = func_get_args();
array_shift($args);
}
$args = count($args) === 1 && is_array($args[0] ?? null)
? $args[0]
: $args;

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

0 comments on commit 33dc44f

Please sign in to comment.