aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Minz/Request.php')
-rw-r--r--lib/Minz/Request.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 63464e8f1..1f15730fb 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -106,7 +106,7 @@ class Minz_Request {
return 0;
}
- public static function paramString(string $key, bool $specialchars = false): string {
+ public static function paramStringNull(string $key, bool $specialchars = false): ?string {
if (isset(self::$params[$key])) {
$s = self::$params[$key];
if (is_string($s)) {
@@ -117,7 +117,11 @@ class Minz_Request {
return (string)$s;
}
}
- return '';
+ return null;
+ }
+
+ public static function paramString(string $key, bool $specialchars = false): string {
+ return self::paramStringNull($key, $specialchars) ?? '';
}
/**