Selaa lähdekoodia

Fix previous commit

Visman 2 vuotta sitten
vanhempi
commit
4b4d96a260

+ 1 - 1
app/Models/Forum/Refresh.php

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

+ 1 - 1
app/Models/Pages/Admin/Bans.php

@@ -57,7 +57,7 @@ class Bans extends Admin
 
 
         if (
         if (
             ! \hash_equals($data[1], $this->c->Secury->hash($data[0]))
             ! \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;
             return false;
         }
         }

+ 1 - 1
app/Models/Pages/Admin/Users.php

@@ -67,7 +67,7 @@ abstract class Users extends Admin
 
 
         if (
         if (
             ! \hash_equals($data[1], $this->c->Secury->hash($data[0]))
             ! \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;
             return false;
         }
         }

+ 1 - 1
app/Models/Provider/Driver.php

@@ -224,7 +224,7 @@ abstract class Driver extends Model
 
 
         } elseif (\is_string($result)) {
         } elseif (\is_string($result)) {
             if (\str_starts_with($this->respContentType, 'application/json')) {
             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)) {
                 if (\is_array($data)) {
                     return $this->c->Secury->replInvalidChars($data);
                     return $this->c->Secury->replInvalidChars($data);