Skip to content

Commit 44c0d2d

Browse files
author
Gertjan Roke
authored
Switched to getKey method instead of the id attribute
1 parent 11df7e1 commit 44c0d2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MonologHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ protected function addContext(array $context = [])
4242
$data = @call_user_func($config['person_fn']);
4343
if (! empty($data)) {
4444
if (is_object($data)) {
45-
if (isset($data->id)) {
46-
$person['id'] = $data->id;
45+
if (method_exists($data, 'getKey')) {
46+
$person['id'] = $data->getKey();
4747
if (isset($data->username)) {
4848
$person['username'] = $data->username;
4949
}

0 commit comments

Comments
 (0)