diff options
| author | 2023-04-07 16:12:03 +0200 | |
|---|---|---|
| committer | 2023-04-07 16:12:03 +0200 | |
| commit | b6ac505f8fa0012fa48d2442dd98cabdaf122269 (patch) | |
| tree | 76085b1e4a03c2b56f03f73f086fbc9bacd7919f /lib/Minz/Url.php | |
| parent | dbbae15a8458679db0f4540dacdbdcff9c02ec8c (diff) | |
Fix login (#5271)
Fix https://github.com/FreshRSS/FreshRSS/issues/5270
Diffstat (limited to 'lib/Minz/Url.php')
| -rw-r--r-- | lib/Minz/Url.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index 80745848a..1350973c1 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -127,8 +127,11 @@ class Minz_Url { return $url_checked; } - /** @param array<string,string|array<string,string>> $url */ - public static function serialize(array $url = []): string { + /** @param array<string,string|array<string,string>>|null $url */ + public static function serialize(?array $url = []): string { + if (empty($url)) { + return ''; + } try { return base64_encode(json_encode($url, JSON_THROW_ON_ERROR)); } catch (\Throwable $exception) { |
