diff options
author | Evan Prodromou <evan@status.net> | 2009-12-14 16:40:56 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-14 16:40:56 -0500 |
commit | 9384a6e2429d8ef9a68185c869758b1e258092c1 (patch) | |
tree | 4a226cd9032206316da73bf2200b311f6aaf8fe9 /lib/api.php | |
parent | 6ff13d6828d01a142b60b4254c07f6f9ad3f16ba (diff) |
fix error with cached repeat of deleted original in api output
Diffstat (limited to 'lib/api.php')
-rw-r--r-- | lib/api.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/api.php b/lib/api.php index 0c6650111..833bc1c5f 100644 --- a/lib/api.php +++ b/lib/api.php @@ -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; + } } } |