Commit 9384a6e2 authored by Evan Prodromou's avatar Evan Prodromou

fix error with cached repeat of deleted original in api output

parent 6ff13d68
......@@ -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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment