Env:
Version: UNRAID 7.2.4
Problem:
/var/log/syslog:
exit status 255 from user root /usr/local/emhttp/plugins/dynamix/scripts/monitor &> /dev/null
exit status 255 from user root /usr/local/emhttp/plugins/dynamix/scripts/monitor &> /dev/null
exit status 255 from user root /usr/local/emhttp/plugins/dynamix/scripts/monitor &> /dev/null
Solution:
Test run stripts use phpdbg,The error occurs because $level (or $saved[$item][$attr]) is a string instead of a number, and PHP 8+ no longer allows implicit mathematical calculations on strings.
phpdbg /usr/local/emhttp/plugins/dynamix/scripts/monitor
[Welcome to phpdbg, the interactive PHP debugger, v8.3.26]
To get help using phpdbg type "help" and press enter
[Please report bugs to ]
[Successful compilation of /usr/local/emhttp/plugins/dynamix/scripts/monitor]
prompt> run
[Uncaught TypeError in /usr/local/emhttp/plugins/dynamix/scripts/monitor on line 90: Unsupported operand types: int * string]
>00090: $last = ($saved[$item][$attr] ?? 0)*$level;
00091: if ($raw>0 || $fail) {
00092: if ($raw>$last) {
Fix it by explicitly casting the values to integers or floats using (int) or (float),replace code in monitor line 90:
$last = int(saved.get(item, {}).get(attr, 0)) * int(level)