]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix error with cached repeat of deleted original in api output
authorEvan Prodromou <evan@status.net>
Mon, 14 Dec 2009 21:40:56 +0000 (16:40 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 14 Dec 2009 21:40:56 +0000 (16:40 -0500)
lib/api.php

index 0c66501116313226159841ae8cd1d956eeff2b7f..833bc1c5fcc7f66c4d16c644e43d01cb94f53379 100644 (file)
@@ -224,9 +224,13 @@ class ApiAction extends Action
             return $base;
         } else {
             $original = Notice::staticGet('id', $notice->repeat_of);
-            $original_array = $this->twitterSimpleStatusArray($original, $include_user);
-            $original_array['retweeted_status'] = $base;
-            return $original_array;
+            if (empty($original)) {
+                return $base;
+            } else {
+                $original_array = $this->twitterSimpleStatusArray($original, $include_user);
+                $original_array['retweeted_status'] = $base;
+                return $original_array;
+            }
         }
     }