]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixes bug 359 381/head
authorThomas Citharel <thomas.citharet@gmail.com>
Sat, 4 Jan 2014 20:50:08 +0000 (21:50 +0100)
committerThomas Citharel <thomas.citharet@gmail.com>
Sat, 4 Jan 2014 20:50:08 +0000 (21:50 +0100)
inc/3rdparty/FlattrItem.class.php

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