mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Undefined array key fixes (#14532)
* Undefined array key fixes * Update check-services.php
This commit is contained in:
@@ -33,7 +33,7 @@ $polled_services = 0;
|
||||
|
||||
$where = '';
|
||||
$params = [];
|
||||
if ($options['h']) {
|
||||
if (isset($options['h'])) {
|
||||
if (is_numeric($options['h'])) {
|
||||
$where = 'AND `S`.`device_id` = ?';
|
||||
$params[] = (int) $options['h'];
|
||||
|
@@ -261,7 +261,7 @@ function get_device(Illuminate\Http\Request $request)
|
||||
|
||||
// find device matching the id
|
||||
$device = device_by_id_cache($device_id);
|
||||
if (! $device || ! $device['device_id']) {
|
||||
if (! $device || ! isset($device['device_id'])) {
|
||||
return api_error(404, "Device $hostname does not exist");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user