Fix error 500 on feed update when feed ref ID is missing
This commit is contained in:
+5
-2
@@ -302,11 +302,14 @@ class Feed extends PhpObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function retrieveFeed() {
|
private function retrieveFeed() {
|
||||||
$sContent = '[]';
|
if($this->sRefFeedId == '') {
|
||||||
if($this->sRefFeedId !='') {
|
$sContent = '{"response":{"errors":{"error":{"code":"","text":"Feed reference ID missing","description":"Feed reference ID missing"}}}}';
|
||||||
|
}
|
||||||
|
else {
|
||||||
$sUrl = self::FEED_HOOK.$this->sRefFeedId.self::FEED_TYPE_JSON;
|
$sUrl = self::FEED_HOOK.$this->sRefFeedId.self::FEED_TYPE_JSON;
|
||||||
$sContent = file_get_contents($sUrl);
|
$sContent = file_get_contents($sUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_decode($sContent, true);
|
return json_decode($sContent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user