fix error with cached repeat of deleted original in api output

This commit is contained in:
Evan Prodromou 2009-12-14 16:40:56 -05:00
parent 6ff13d6828
commit 9384a6e242

View 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;
}
}
}