mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Rollback #4908
This commit is contained in:
parent
3b650b7ebd
commit
c9c58d2858
@ -306,10 +306,13 @@ class Router
|
||||
* @param string|null $default
|
||||
* @return string|null
|
||||
*/
|
||||
public function getParameter(string $name, string $default = null)
|
||||
public function getParameter($name, $default = null)
|
||||
{
|
||||
$value = $this->parameters[$name] ?? '';
|
||||
return $value !== '' ? $value : $default;
|
||||
if (isset($this->parameters[$name]) && ($this->parameters[$name] === '0' || !empty($this->parameters[$name]))) {
|
||||
return $this->parameters[$name];
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user