- 'target_author_id' => $params['authorIds'],
- 'target_author_ip' => $params['authorIPs'],
- ] );
+ ];
+ if ( isset( $params['authorIds'] ) ) {
+ $relations += [
+ 'target_author_id' => $params['authorIds'],
+ 'target_author_ip' => $params['authorIPs'],
+ ];
+ }
+ if ( isset( $params['authorActors'] ) ) {
+ $relations += [
+ 'target_author_actor' => $params['authorActors'],
+ ];
+ }
+ $logEntry->setRelations( $relations );