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'); |
|
Thanks. Fixed in r12249.
This is incorrect use of the version field though, so at some point should be split up. We can't handle multiple version strings at the moment though, so it can stay for now!