Core\Router: Do less calculations in link() method

This commit is contained in:
Visman 2023-11-03 15:44:40 +07:00
parent 432a441a2c
commit 2e64177610

View file

@ -149,7 +149,9 @@ class Router
'page' !== $name
|| 1 !== $args[$name]
) {
$data['{' . $name . '}'] = \rawurlencode(\str_replace($this->subSearch, $this->subRepl, (string) $args[$name]));
$data['{' . $name . '}'] = \is_integer($args[$name])
? (string) $args[$name]
: \rawurlencode(\str_replace($this->subSearch, $this->subRepl, (string) $args[$name]));
continue;
}