We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a774fc commit 74f531dCopy full SHA for 74f531d
app/code/Magento/Elasticsearch/SearchAdapter/Query/ValueTransformer/IntegerTransformer.php
@@ -19,6 +19,16 @@ class IntegerTransformer implements ValueTransformerInterface
19
*/
20
public function transform(string $value): ?int
21
{
22
- return \is_numeric($value) ? (int) $value : null;
+ return (\is_numeric($value) &&
23
+ $this->validateIntegerTypesWithInRange($value)) ? (int) $value : null;
24
+ }
25
+
26
+ /**
27
+ * @param $value
28
+ * @return bool
29
+ */
30
+ public function validateIntegerTypesWithInRange($value): bool
31
+ {
32
+ return (abs($value) & 0x7FFFFFFF) === abs($value);
33
}
34
0 commit comments