diff options
| author | 2022-02-07 01:35:29 +0100 | |
|---|---|---|
| committer | 2022-02-07 01:35:29 +0100 | |
| commit | 946b0a0876f1c14ada9ceac62a70d6af170a2d33 (patch) | |
| tree | da266af10fe8a5ea9c1e7a86b6fd8083fb010444 /app/Models/Feed.php | |
| parent | ede82f9819e1fa6aafd2cb27010c84ef18bb06c0 (diff) | |
Hot fix: fix type hint null regression (#4207)
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 48aba2b4b..3425f4bce 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -33,7 +33,7 @@ class FreshRSS_Feed extends Minz_Model { private $ttl = self::TTL_DEFAULT; private $attributes = []; private $mute = false; - private $hash = null; + private $hash = ''; private $lockPath = ''; private $hubUrl = ''; private $selfUrl = ''; @@ -58,7 +58,7 @@ class FreshRSS_Feed extends Minz_Model { } public function hash(): string { - if ($this->hash === null) { + if ($this->hash == '') { $salt = FreshRSS_Context::$system_conf->salt; $this->hash = hash('crc32b', $salt . $this->url); } @@ -191,7 +191,7 @@ class FreshRSS_Feed extends Minz_Model { $this->id = intval($value); } public function _url(string $value, bool $validate = true) { - $this->hash = null; + $this->hash = ''; if ($validate) { $value = checkUrl($value); } @@ -304,9 +304,9 @@ class FreshRSS_Feed extends Minz_Model { } $links = $simplePie->get_links('self'); - $this->selfUrl = isset($links[0]) ? $links[0] : null; + $this->selfUrl = $links[0] ?? ''; $links = $simplePie->get_links('hub'); - $this->hubUrl = isset($links[0]) ? $links[0] : null; + $this->hubUrl = $links[0] ?? ''; if ($loadDetails) { // si on a utilisé l’auto-discover, notre url va avoir changé |
