patrickpr / trapdirector

Icingaweb2 module for receiving and handling snmp traps
GNU General Public License v3.0
53 stars 15 forks source link

PHP Parse ERROR #57

Open ghost opened 3 years ago

ghost commented 3 years ago

Main question

Hello, a trap is received but when is handle by the TrapApi I got this message

Apr 9 15:12:50 socadm snmptrapd: PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php on line 21

Also when I go to /icingaweb2/trapdirector/status/plugins Parse error : syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php on line 21

Your Environment

If related to the question in any way :

6bIBAET commented 2 years ago

Same too. Editing /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php on line 21, 22 and 23 change from public const MASTER=1; public const MASTERHA=2; public const SAT=3; to const MASTER=1; const MASTERHA=2; const SAT=3;