Fix previous commit

This commit is contained in:
Visman 2023-05-31 16:07:38 +07:00
parent 5ce8e20f9b
commit 4b4d96a260
4 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ class Refresh extends Action
*/
protected function formatModers(string $str): ?array
{
$moderators = \json_decode($str, true, 512, \JSON_THROW_ON_ERROR);
$moderators = \json_decode($str, true);
return $moderators ?: null;
}

View file

@ -57,7 +57,7 @@ class Bans extends Admin
if (
! \hash_equals($data[1], $this->c->Secury->hash($data[0]))
|| ! \is_array($data = \json_decode(\base64_decode($data[0], true), true, 512, \JSON_THROW_ON_ERROR))
|| ! \is_array($data = \json_decode(\base64_decode($data[0], true), true))
) {
return false;
}

View file

@ -67,7 +67,7 @@ abstract class Users extends Admin
if (
! \hash_equals($data[1], $this->c->Secury->hash($data[0]))
|| ! \is_array($data = \json_decode(\base64_decode($data[0], true), true, 512, \JSON_THROW_ON_ERROR))
|| ! \is_array($data = \json_decode(\base64_decode($data[0], true), true))
) {
return false;
}

View file

@ -224,7 +224,7 @@ abstract class Driver extends Model
} elseif (\is_string($result)) {
if (\str_starts_with($this->respContentType, 'application/json')) {
$data = \json_decode($result, true, 20, \JSON_THROW_ON_ERROR);
$data = \json_decode($result, true, 20);
if (\is_array($data)) {
return $this->c->Secury->replInvalidChars($data);