Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikBuetler committed Aug 14, 2024
1 parent 6452392 commit cef9b6c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion libraries/dba/AbstractModelFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,16 @@ public function logalyzerUpdateHash($jobId, $hash) {
public function getJobCountForLogLevel($job, $logLevel, $type) {
if($job->getLogalyzerResults() != null) {
$json = json_decode($job->getLogalyzerResults(), true);
$resultArray = $json['result'];
if(isset($json['result'])) {
$resultArray = $json['result'];
}
# An early version of this feature used the key 'pattern' which was changed before release. This is just a fallback
elseif(isset($json['pattern'])) {
$resultArray = $json['pattern'];
}
else {
return null;
}
$count = 0;
foreach ($resultArray as $element) {
if ($type === "negative" && $element["type"] === "negative" && $element["logLevel"] === $logLevel) {
Expand Down

0 comments on commit cef9b6c

Please sign in to comment.