Skip to content

Commit 7b62b4d

Browse files
authored
Added support for PHP 8.2 (#5)
* fix `Call to a member function call() on null` * fix `Implicit conversion from floatto int loses precision` * fix `Creation of dynamic property is deprecated` * Cambio tipo de atributo
1 parent a2e87fe commit 7b62b4d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/AirbrakeTarget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function export()
5050
// add additional information available from logger
5151
$airbrakeNotice['context']['severity'] = Logger::getLevelName($level);
5252
$airbrakeNotice['context']['category'] = $category;
53-
$airbrakeNotice['context']['timestamp'] = date('Y-m-d H:i:s', $timestamp);
53+
$airbrakeNotice['context']['timestamp'] = date('Y-m-d H:i:s', intval($timestamp));
5454

5555
if ($airbrakeNotice !== null) {
5656
$this->airbrakeService->sendNotice($airbrakeNotice);

src/Notifier.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ class Notifier extends AirbrakeNotifier
99
{
1010
private $user;
1111

12+
/**
13+
* @var array
14+
*/
15+
protected $errorConfig;
16+
1217
public function __construct($opt)
1318
{
1419
parent::__construct($opt);
@@ -25,7 +30,7 @@ public function buildNotice($exc)
2530
if (isset($user->id)) {
2631
$notice['context']['user']['id'] = $user->id;
2732
}
28-
if (isset($user->identity)) {
33+
if (isset($user->identity) && isset($this->user)) {
2934
$notice['context']['user'] = $this->user->call($this, $user->identity);
3035
}
3136
}

0 commit comments

Comments
 (0)