diff options
| author | 2025-01-31 13:59:51 +0100 | |
|---|---|---|
| committer | 2025-01-31 13:59:51 +0100 | |
| commit | e749490693eccd61e9ea9152fada33470e5492f7 (patch) | |
| tree | 405c8c03a676f74399f21830e5e0244dac5eb8bd /app/Models | |
| parent | f72f5e95238a866c39535932c803720d7644a276 (diff) | |
Pass PHPStan checkBenevolentUnionTypes (#7270)
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Feed.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index dd508299d..953ffc918 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -1149,6 +1149,10 @@ class FreshRSS_Feed extends Minz_Model { file_put_contents($hubFilename, json_encode($hubJson)); } $ch = curl_init(); + if ($ch === false) { + Minz_Log::warning('curl_init() failed in ' . __METHOD__); + return false; + } curl_setopt_array($ch, [ CURLOPT_URL => $hubJson['hub'], CURLOPT_RETURNTRANSFER => true, @@ -1166,6 +1170,10 @@ class FreshRSS_Feed extends Minz_Model { ]); $response = curl_exec($ch); $info = curl_getinfo($ch); + if (!is_array($info)) { + Minz_Log::warning('curl_getinfo() failed in ' . __METHOD__); + return false; + } Minz_Log::warning('WebSub ' . ($state ? 'subscribe' : 'unsubscribe') . ' to ' . $url . ' via hub ' . $hubJson['hub'] . |
