-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when logging out #2
Labels
bug
Something isn't working
Comments
// Update: Since # Lines 156 - 161
$log = new Log([
'type' => $event->type(),
'action' => $event->action(),
'user' => $event->user()->email(),
'language' => kirby()->languageCode(),
]); Let me know if you'd be willing to merge a PR and I'll whip one up right away! |
Go for it 👌 Thank you |
I'll open up a PR and let you know 🦊 |
I get the same error, even when I try to reorder images for example. |
I should really send this PR 😀 |
my solution /**
* @param Event $event
*/
public static function log(Event $event): void
{
if (!in_array($event->type(), self::TYPES) || $event->action() === 'render') {
return;
}
$log = self::getLog($event);
self::$connection->table('logs')->insert($log->toArray());
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there,
when logging out, I get this message:
Call to a member function email() on null
. Commenting out Line 159 insideclasses/Logger.php
makes this error go away, see https://github.com/michnhokn/kirby3-logger/blob/main/classes/Logger.php#L159Cheers,
S1SYPHOS
The text was updated successfully, but these errors were encountered: