diff --git a/www/pfSense-pkg-squid/files/usr/local/www/widgets/widgets/squid_antivirus_status.widget.php b/www/pfSense-pkg-squid/files/usr/local/www/widgets/widgets/squid_antivirus_status.widget.php index c1ec372dade0..ba3eac8ae449 100644 --- a/www/pfSense-pkg-squid/files/usr/local/www/widgets/widgets/squid_antivirus_status.widget.php +++ b/www/pfSense-pkg-squid/files/usr/local/www/widgets/widgets/squid_antivirus_status.widget.php @@ -76,15 +76,18 @@ function squid_clamav_version() { global $img; // ClamAV status and version $s = (is_service_running("clamd") ? $img['up'] : $img['down']); - pkg_exec("query '%v' clamav", $version, $err); + $rc = pkg_exec("query '%v' clamav", $version, $err); + $version = (($rc != 0) ? "N/A" : $version); $s .= " ClamAV {$version}"; $s .= " "; // C-ICAP status and version $s .= (is_service_running("c-icap") ? $img['up'] : $img['down']); - pkg_exec("query '%v' c-icap", $version, $err); + $rc = pkg_exec("query '%v' c-icap", $version, $err); + $version = (($rc != 0) ? "N/A" : $version); $s .= " C-ICAP {$version}"; // SquidClamav version - pkg_exec("query '%v' squidclamav", $version, $err); + $rc = pkg_exec("query '%v' squidclamav", $version, $err); + $version = (($rc != 0) ? "N/A" : $version); $s .= "+ SquidClamav {$version}"; return $s; } @@ -119,7 +122,8 @@ function squid_antivirus_statistics() {