mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Sensu: Correct type hint (#13915)
* Correct type annotation Not 100% sure this is correct as I don't know what the previous change was trying to correct - but they're definitely not all strings. * Correct the correction
This commit is contained in:
@@ -151,7 +151,7 @@ class Sensu extends Transport
|
||||
'librenms-device-id' => strval($obj['device_id']),
|
||||
'librenms-rule-id' => strval($obj['rule_id']),
|
||||
'librenms-status-reason' => $obj['status_reason'],
|
||||
], function (string $s): bool {
|
||||
], function (?string $s): bool {
|
||||
return (bool) strlen($s); // strlen returns 0 for null, false or '', but 1 for integer 0 - unlike empty()
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user