- if (
- !empty($activity['thread-children-type'])
- && in_array($activity['thread-children-type'], Receiver::ACTIVITY_TYPES)
- && DI::pConfig()->get($receiver, 'system', 'accept_only_sharer') != Item::COMPLETION_LIKE
- ) {
- Logger::info('Top level post from thread completion from a non sharer had been initiated via an activity, ignoring',
- ['type' => $activity['thread-children-type'], 'user' => $item['uid'], 'causer' => $item['causer-link'], 'author' => $activity['author'], 'url' => $item['uri']]);
- continue;
+ if ((DI::pConfig()->get($receiver, 'system', 'accept_only_sharer') != Item::COMPLETION_LIKE)
+ && in_array($activity['thread-children-type'] ?? '', Receiver::ACTIVITY_TYPES)) {
+ Logger::info('Top level post from thread completion from a non sharer had been initiated via an activity, ignoring',
+ ['type' => $activity['thread-children-type'], 'user' => $item['uid'], 'causer' => $item['causer-link'], 'author' => $activity['author'], 'url' => $item['uri']]);
+ continue;
+ }