CJSON->decode corrupt big length data

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Major
    • 1.8.2
    • Affects Version/s: 1.8.1, 1.8.2
    • Component/s: Frontend (F)
    • None

      If any field length in json string longer then ~60000 symbols then field after CJSON->decode will be empty
      Fix: I don't fixed it in CJSON class, in php>5.2.0 internal function json_decode presents. For compatible with old php versions i do this for example:
      if(!function_exists("json_decode"))

      { //There is a bug in CJSON.decode. If data longer than ~60000 symbols it will be decoded as empty. json_decode function is internal php function since 5.2.0 and have no this bug $json = new CJSON(); $rcv = $json->decode($reply, true); }

      else

      { $rcv = json_decode($reply, true); }

            Assignee:
            Unassigned
            Reporter:
            Fyodor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: