소스 검색

Fix previous commit

Visman 2 년 전
부모
커밋
4b4d96a260
4개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      app/Models/Forum/Refresh.php
  2. 1 1
      app/Models/Pages/Admin/Bans.php
  3. 1 1
      app/Models/Pages/Admin/Users.php
  4. 1 1
      app/Models/Provider/Driver.php

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

@@ -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;
     }

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

@@ -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;
         }

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

@@ -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;
         }

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

@@ -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);