diff options
| author | horus | 2020-04-21 10:58:12 +0200 |
|---|---|---|
| committer | horus | 2020-04-21 10:58:12 +0200 |
| commit | d6505098b79c8b891cc8a1f6a798cc3ff11253bd (patch) | |
| tree | 862b94d969fd132a16b895faa88d5b9e0f2426f3 /app | |
| parent | a1f147cf4f6b5f4f77afdf245434fa0f4429228a (diff) | |
| download | senpai-d6505098b79c8b891cc8a1f6a798cc3ff11253bd.tar.gz | |
Fix to display score as null, not zero.
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/helpers.php b/app/helpers.php index 1c2896f..0953a56 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -38,10 +38,16 @@ function printScoreData($score_array) { foreach($score_array as $score) { try { - $return .= formatFloat($score); + $f_score = formatFloat($score); } catch( Exception $e ) { error_log("printScoreData: score data seems to be messed up: " . $e->getMessage()); - $return .= 0; + $f_score = 0; + } + + if ( 0 != $f_score ) { + $return .= $f_score; + } else { + $return .= "null"; } $return .= ","; } |
