Skip to content

Fixes PHP warnings in monitor for mem and clamav

100-monitor_mem_usage.inc.php

  • Added basic checks to see if line is greater or equal to 1 character

100-monitor_clamav_log.inc.php

  • Added basic checks to see if array is greater or equal to 2 items

Error messages being fixed

PHP Warning:  Undefined array key -1 in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php on line 111

PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php on line 111

PHP Warning:  Undefined array key 1 in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79

PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79

Signed-off-by: Nephiaust 29741794+Nephiaust@users.noreply.github.com

Merge request reports