aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Models/Feed.php8
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'] .