Fixed gigantic oversight.
This commit is contained in:
parent
af8e86ea09
commit
d86291abf8
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ class RequestVar
|
||||||
|
|
||||||
public function string(?string $default = null): ?string
|
public function string(?string $default = null): ?string
|
||||||
{
|
{
|
||||||
return mb_scrub(preg_replace('/[\x00-\x09\x0B-\x0C\x0D-\x1F\x7F]/u', '', (string)$this->value));
|
return empty($this->value) ? $default : mb_scrub(preg_replace('/[\x00-\x09\x0B-\x0C\x0D-\x1F\x7F]/u', '', (string)$this->value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function int(?int $default = null): ?int
|
public function int(?int $default = null): ?int
|
||||||
|
|
Loading…
Add table
Reference in a new issue