mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix Down/Up time error if device is unpolled (#15545)
This commit is contained in:
@@ -301,7 +301,7 @@ class Device extends BaseModel
|
||||
|
||||
public function formatDownUptime($short = false): string
|
||||
{
|
||||
$time = ($this->status == 1) ? $this->uptime : $this->last_polled->diffInSeconds();
|
||||
$time = ($this->status == 1) ? $this->uptime : $this->last_polled?->diffInSeconds();
|
||||
|
||||
return Time::formatInterval($time, $short);
|
||||
}
|
||||
|
Reference in New Issue
Block a user