if ($this->repeat_of) {
$repeated = Notice::staticGet('id', $this->repeat_of);
- $act->objects[] = $repeated->asActivity($cur);
+ if (!empty($repeated)) {
+ $act->objects[] = $repeated->asActivity($cur);
+ }
} else {
$act->objects[] = ActivityObject::fromNotice($this);
}
if (common_config('notice', 'hidespam')) {
if ($this->streamProfile->hasRole(Profile_role::SILENCED) &&
- (empty($this->userProfile) || ($this->userProfile->id !== $this->streamProfile->id) && !$this->userProfile->hasRight(Right::REVIEWSPAM))) {
+ (empty($this->userProfile) || (($this->userProfile->id !== $this->streamProfile->id) && !$this->userProfile->hasRight(Right::REVIEWSPAM)))) {
return true;
}
}