1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-24 01:52:15 -05:00
This commit is contained in:
Nicolas Lœuillet 2014-01-07 13:13:30 +01:00
commit f41d00ed8a

View File

@ -14,12 +14,12 @@ class FlattrItem {
$flattrResponse = file_get_contents(CACHE . "/flattr/".$id.".cache"); $flattrResponse = file_get_contents(CACHE . "/flattr/".$id.".cache");
if($flattrResponse != FALSE) { if($flattrResponse != FALSE) {
$result = json_decode($flattrResponse); $result = json_decode($flattrResponse);
if (isset($result->message)){ if (isset($result->message)){
if ($result->message == "flattrable") { if ($result->message == "flattrable") {
$this->status = FLATTRABLE; $this->status = FLATTRABLE;
} }
} }
elseif ($result->link) { elseif (is_object($result) && $result->link) {
$this->status = FLATTRED; $this->status = FLATTRED;
$this->flattrItemURL = $result->link; $this->flattrItemURL = $result->link;
$this->numflattrs = $result->flattrs; $this->numflattrs = $result->flattrs;