Jelajahi Sumber

fix json_decode call parameters (#4381)

urfinjuezz 7 tahun lalu
induk
melakukan
d7d863ea07
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      php/src/Google/Protobuf/Internal/Message.php

+ 1 - 1
php/src/Google/Protobuf/Internal/Message.php

@@ -1104,7 +1104,7 @@ class Message
      */
     public function parseFromJsonStream($input)
     {
-        $array = json_decode($input->getData(), JSON_BIGINT_AS_STRING);
+        $array = json_decode($input->getData(), true, 512, JSON_BIGINT_AS_STRING);
         if (is_null($array)) {
             throw new GPBDecodeException(
                 "Cannot decode json string.");