diff --git a/pages/audit.php b/pages/audit.php index e056788bf..71d49cb11 100644 --- a/pages/audit.php +++ b/pages/audit.php @@ -310,11 +310,10 @@ try } } $aResults[] = $aRow; - $iTotalErrors = count($aObjectsWithErrors); - $sOverallPercentOk = ($iCount == 0) ? '100.00' : sprintf('%.2f', 100.0 * (($iCount - $iTotalErrors) / $iCount)); - $sClass = GetReportColor($iCount, $iTotalErrors); - } + $iTotalErrors = count($aObjectsWithErrors); + $sOverallPercentOk = ($iCount == 0) ? '100.00' : sprintf('%.2f', 100.0 * (($iCount - $iTotalErrors) / $iCount)); + $sClass = GetReportColor($iCount, $iTotalErrors); } catch(Exception $e) { @@ -326,6 +325,10 @@ try $sMessage = Dict::Format('UI:Audit:ErrorIn_Category_Reason', $oAuditCategory->GetHyperlink(), $e->getMessage()); $oP->p(" ".$sMessage); $aResults[] = $aRow; + + $sClass = 'red'; + $iTotalErrors = 'n/a'; + $sOverallPercentOk = ''; } $oP->add("\n"); $oP->add("".$oAuditCategory->GetName()."$iCount$iTotalErrors$sOverallPercentOk %\n");