Core\Router: Do less calculations in link() method
This commit is contained in:
parent
432a441a2c
commit
2e64177610
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue