PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.22
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.22
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
← All changes | vendor_prefixed/sentry/sentry/src/Serializer/RepresentationSerializer.php +17 -2 1.10.19 → 1.10.22 View file →
@@ -40,13 +40,28 @@
40 40 }
41 41 if ($value === \true) {
42 42 return 'true';
43 43 }
44 - if (\is_float($value) && (int) $value == $value) {
45 - return $value . '.0';
44 + if (\is_float($value)) {
45 + if (\is_nan($value)) {
46 + return 'NAN';
47 + }
48 + if ($this->isCastableToInt($value) && (int) $value == $value) {
49 + return $value . '.0';
50 + }
46 51 }
47 52 if (\is_numeric($value)) {
48 53 return (string) $value;
49 54 }
50 55 return (string) parent::serializeValue($value);
56 + }
57 + /**
58 + * Casting a non-finite float, or one that falls outside of the integer
59 + * range, raises a warning as of PHP 8.5.
60 + *
61 + * @param float $value The value to check
62 + */
63 + private function isCastableToInt(float $value) : bool
64 + {
65 + return $value >= (float) \PHP_INT_MIN && $value < (float) \PHP_INT_MAX;
51 66 }
52 67 }