Environment
- OpenMediaVault: 8.0
- Plugin version: openmediavault-fail2ban 8.0
- OS: Debian GNU/Linux 13 Trixie (Raspberry Pi 4)
- Fail2ban: 1.1.0-8
Bug description
When opening Diagnostics → Services → Fail2ban in the OMV web interface,
the following error is displayed:
Invalid RPC response. Please check the syslog for more information.
Error in syslog
PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /usr/share/openmediavault/engined/rpc/fail2ban.inc:161
Root cause
In fail2ban.inc line 161, implode() receives a string instead of an array:
// Buggy code (line 161)
$stats .= implode("\n", "No jail enabled");
// Fix
$stats .= implode("\n", ["No jail enabled"]);
Fix applied
sudo sed -i 's/implode("\\n", "No jail enabled")/implode("\\n", ["No jail enabled"])/' \
/usr/share/openmediavault/engined/rpc/fail2ban.inc
This one-line fix resolves the issue immediately.
Environment
Bug description
When opening Diagnostics → Services → Fail2ban in the OMV web interface,
the following error is displayed:
Error in syslog
PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /usr/share/openmediavault/engined/rpc/fail2ban.inc:161Root cause
In
fail2ban.incline 161,implode()receives a string instead of an array:Fix applied
sudo sed -i 's/implode("\\n", "No jail enabled")/implode("\\n", ["No jail enabled"])/' \ /usr/share/openmediavault/engined/rpc/fail2ban.incThis one-line fix resolves the issue immediately.