Misc fixes 42 (#15413)

* Misc Fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Tony Murray
2023-10-07 21:39:16 -05:00
committed by GitHub
parent ac23c133d9
commit 685d11d4f1
7 changed files with 137 additions and 131 deletions

View File

@@ -40,7 +40,7 @@ class DevicePoll extends LnmsCommand
try {
/** @var \LibreNMS\Poller $poller */
$poller = app(Poller::class, ['device_spec' => $this->argument('device spec'), 'module_override' => explode(',', $this->option('modules'))]);
$poller = app(Poller::class, ['device_spec' => $this->argument('device spec'), 'module_override' => explode(',', $this->option('modules') ?? '')]);
$polled = $poller->poll();
if ($polled > 0) {

View File

@@ -470,7 +470,7 @@ class Device extends BaseModel
public function setIpAttribute($ip): void
{
$this->attributes['ip'] = inet_pton($ip);
$this->attributes['ip'] = inet_pton($ip ?? '');
}
public function setStatusAttribute($status): void