WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

TapActivity triggers twice #1413

@projct1

Description

@projct1

Describe the bug
In my model i have to use crutch is_string($value), because tapActivity triggers twice:

  1. from LogsActivity trait at line 85
  2. from ActivityLogger class at line 171
public function tapActivity(Activity $activity, string $eventName): void
{
    foreach ($activity->getExtraProperty('attributes', []) as $field => $value) {
        if (is_string($value)) {
            $activity->properties = $activity->properties->merge([
                'attributes' => [
                    $field => [
                        'value' => $value,
                        'reason' => null,
                        'accepted' => false
                    ]
                ]
            ]);
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions