Skip to content

Commit 80add74

Browse files
committed
Fix for allowing big ints
Fixes web issue 433
1 parent 60cbda8 commit 80add74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/controllers/FacebookController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function logUserIn($request, $db)
6161
]
6262
]);
6363
if ($res->getStatusCode() == 200) {
64-
$data = json_decode((string)$res->getBody(), true);
64+
$data = json_decode((string)$res->getBody(), true, 512, JSON_BIGINT_AS_STRING);
6565
if (!array_key_exists('email', $data)) {
6666
throw new Exception("Email address is unavailable", 403);
6767
}

src/views/JsonView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function numericCheck($data)
4747

4848
protected function scalarNumericCheck($key, $value)
4949
{
50-
if (is_numeric($value) && ! in_array($key, $this->string_fields)) {
50+
if (is_numeric($value) && ! in_array($key, $this->string_fields) && $value < PHP_INT_MAX) {
5151
return (float) $value;
5252
}
5353

0 commit comments

Comments
 (0)