diff options
author | Mario <mario@mariovavti.com> | 2024-03-16 15:47:55 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-16 15:47:55 +0000 |
commit | 2874d3e1e14e23484c71a64d8cff06733f33c430 (patch) | |
tree | 88e651e6b1980a6960116fca36d040e8fedac843 | |
parent | 36778850eefa70106c78348c58a8d05d20aa7094 (diff) | |
parent | 42b0205ad0a4566b35057563c4dcf378f0d390ac (diff) | |
download | volse-hubzilla-2874d3e1e14e23484c71a64d8cff06733f33c430.tar.gz volse-hubzilla-2874d3e1e14e23484c71a64d8cff06733f33c430.tar.bz2 volse-hubzilla-2874d3e1e14e23484c71a64d8cff06733f33c430.zip |
Merge branch 'dev' into 9.0RC
-rw-r--r-- | vendor/mmccook/php-json-canonicalization-scheme/src/Utils.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/mmccook/php-json-canonicalization-scheme/src/Utils.php b/vendor/mmccook/php-json-canonicalization-scheme/src/Utils.php index 57079df3b..755ba3320 100644 --- a/vendor/mmccook/php-json-canonicalization-scheme/src/Utils.php +++ b/vendor/mmccook/php-json-canonicalization-scheme/src/Utils.php @@ -38,12 +38,14 @@ class Utils } if ($number < 1e+21 && $number >= 1e-6) { - $formatted = number_format($number, 7, '.', ''); - $formatted = rtrim($formatted, '.0'); + $formatted = sprintf('%F', $number); + $formatted = rtrim($formatted, '0'); // first remove all zeros at the end + $formatted = rtrim($formatted, '.'); // If the string now ends with a decimal point, then remove it, too. } else { $formatted = sprintf('%e', $number); $parts = explode('e', $formatted); - $parts[0] = rtrim($parts[0], '.0'); + $parts[0] = rtrim($parts[0], '0'); + $parts[0] = rtrim($parts[0], '.'); $formatted = implode('e', $parts); } |