From: Evan Prodromou Date: Mon, 14 Dec 2009 21:40:56 +0000 (-0500) Subject: fix error with cached repeat of deleted original in api output X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9384a6e2429d8ef9a68185c869758b1e258092c1;p=quix0rs-gnu-social.git fix error with cached repeat of deleted original in api output --- diff --git a/lib/api.php b/lib/api.php index 0c66501116..833bc1c5fc 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; + } } }