diff options
author | Simon Rettberg | 2022-05-13 14:26:58 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-05-13 14:26:58 +0200 |
commit | 3b278ac0da30e4c781e336172fcced57b4efb2cf (patch) | |
tree | 212938732f40bcb25dbe4d147a15b86ebec09777 /inc | |
parent | [statistics] Fix undefined index notices (diff) | |
download | slx-admin-3b278ac0da30e4c781e336172fcced57b4efb2cf.tar.gz slx-admin-3b278ac0da30e4c781e336172fcced57b4efb2cf.tar.xz slx-admin-3b278ac0da30e4c781e336172fcced57b4efb2cf.zip |
[eventlog] Cast numeric values to int explicitly, in case they are ''
Diffstat (limited to 'inc')
-rw-r--r-- | inc/util.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php index d95265f4..b4340c94 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -113,7 +113,7 @@ class Util $decimals = 2 - floor(strlen((int)$bytes) - 1); } } - return sprintf("%.{$decimals}f", $bytes) . "\xe2\x80\x89" . $sz[$factor + $shift]; + return sprintf("%.{$decimals}f", $bytes) . "\xe2\x80\x89" . ($sz[$factor + $shift] ?? '#>PiB#'); } public static function sanitizeFilename(string $name) |