Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Professional Edition
-
None
-
Ubuntu 22.04 Jammy
PHP 8.1.2
Description
With PHP 8.1 the eppc-ups.inc.php poller fails with following error:
##### Module Start: os #####
|
|
o OS Poller OS
|
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /opt/observium/includes/polling/os/eppc-ups.inc.php:23 |
Stack trace:
|
#0 /opt/observium/includes/polling/os.inc.php(157): include() |
#1 /opt/observium/includes/polling/functions.inc.php(305): include('...') |
#2 /opt/observium/poller.php(171): poll_device() |
#3 {main} |
thrown in /opt/observium/includes/polling/os/eppc-ups.inc.php on line 23 |
Workaround patch:
Index: includes/polling/os/eppc-ups.inc.php
|
===================================================================
|
--- includes/polling/os/eppc-ups.inc.php (revision 12246) |
+++ includes/polling/os/eppc-ups.inc.php (working copy)
|
@@ -20,7 +20,7 @@ |
$hardware = snmp_get($device, 'upsEIdentityManufacturer.0', '-OQv', 'EPPC-MIB') . ' (' . |
snmp_get($device, 'upsESystemConfigOutputVA.0', '-OQv', 'EPPC-MIB') . 'VA ' . snmp_get($device, 'upsEIdentityModel.0', '-OQv', 'EPPC-MIB') . ')'; |
$upsEIdentityDescription = snmp_get($device, 'upsEIdentityDescription.0', '-OQv', 'EPPC-MIB'); |
- $version = $upsEIdentityDescription + ' UPS: ' . |
+ $version = $upsEIdentityDescription . ' UPS: ' . |
snmp_get($device, 'upsEIdentityUPSFirmwareVerison.0', '-OQv', 'EPPC-MIB') . ' Firmware: ' . snmp_get($device, 'upsIdentAgentSoftwareVersion.0', '-OQv', 'EPPC-MIB'); |
$status = snmp_get($device, 'upsESystemStatus.0', '-OQv', 'EPPC-MIB') . ' ' . snmp_get($device, 'upsEBatteryTestResult.0', '-OQv', 'EPPC-MIB'); |
|
Attachments
Activity
Resolution | New: Fixed [ 1 ] | |
Status | Original: Pending Response [ 10000 ] | New: Resolved [ 5 ] |
Assignee | Original: Mike Stupalov [ landy ] | New: Adam Armstrong [ adama ] |
Status | Original: Open [ 1 ] | New: Pending Response [ 10000 ] |